Use python3 as the canonical command name course-wide (#104) (#105)
CI / check (push) Successful in 7s
Sync course wiki / sync-wiki (push) Successful in 4s

This commit was merged in pull request #105.
This commit is contained in:
2026-06-23 20:25:05 -04:00
parent 7f439212ac
commit 95e5911957
102 changed files with 380 additions and 378 deletions
@@ -295,9 +295,9 @@ that *you* hold the judgment: which undo, which parent, whether it actually work
4. **Now feel the bug.** It passes the first skim:
```bash
python cli.py add "ship it"
python cli.py clear # prints "cleared all tasks", looks fine!
python cli.py list # CRASHES: it corrupted tasks.json, load() blows up
python3 cli.py add "ship it"
python3 cli.py clear # prints "cleared all tasks", looks fine!
python3 cli.py list # CRASHES: it corrupted tasks.json, load() blows up
```
This is the AI plausibility trap made concrete: the change reviewed fine and "worked," and broke
@@ -337,8 +337,8 @@ that *you* hold the judgment: which undo, which parent, whether it actually work
```bash
rm -f tasks.json # drop the corrupted state file the bug wrote
python cli.py add "back to normal"
python cli.py list # works again, the clear command is gone
python3 cli.py add "back to normal"
python3 cli.py list # works again, the clear command is gone
git log --oneline # the bad merge is STILL there, with a revert after it
```
@@ -360,7 +360,7 @@ that *you* hold the judgment: which undo, which parent, whether it actually work
```bash
git log --oneline -1 # "Add version command"
python cli.py version # prints the version
python3 cli.py version # prints the version
```
2. Now destroy it the way an over-eager "clean up the history" cleanup (or an agent) would, with a
@@ -369,7 +369,7 @@ that *you* hold the judgment: which undo, which parent, whether it actually work
```bash
git reset --hard HEAD~1
git log --oneline -2 # the "Add version command" commit is GONE from the branch
python cli.py version 2>/dev/null || echo "command no longer exists"
python3 cli.py version 2>/dev/null || echo "command no longer exists"
```
It's not in `log`. It feels permanently lost. It isn't.
@@ -384,7 +384,7 @@ that *you* hold the judgment: which undo, which parent, whether it actually work
```bash
git log --oneline -1 # "Add version command" is back
python cli.py version # works again
python3 cli.py version # works again
```
You just recovered a commit that `log` swore was gone. Note the honest limit: step 2's `--hard`
@@ -15,11 +15,11 @@ This is the running example for **Module 1** (where you feel the copy-paste prob
## Run it
```bash
python cli.py add "read module 1"
python cli.py add "set up my editor"
python cli.py list
python cli.py done 0
python cli.py list
python3 cli.py add "read module 1"
python3 cli.py add "set up my editor"
python3 cli.py list
python3 cli.py done 0
python3 cli.py list
```
Requires Python 3.10+ (it uses `list[Task]` style type hints). No third-party packages.
@@ -1,8 +1,8 @@
"""Tiny command-line front end for the demo task app.
Run it:
python cli.py add "write the lesson"
python cli.py list
python3 cli.py add "write the lesson"
python3 cli.py list
State is kept in tasks.json next to this file. It's intentionally minimal; the point of this app
is to be a realistic-but-small thing you change with an AI, not a product.
@@ -31,7 +31,7 @@ def save(tlist: TaskList) -> None:
def main(argv: list[str]) -> int:
tlist = load()
if not argv:
print("usage: python cli.py [add <title> | list | done <index> | count | delete <index>]")
print("usage: python3 cli.py [add <title> | list | done <index> | count | delete <index>]")
return 1
command = argv[0]