Repository navigation
[names] Use builtins and %run, as Python 3 and the code cells do - #654
Conversation
- The built-in definitions are provided by the `builtins` module; `__builtin__` is its Python 2 name. - IPython's `run` command -> `%run`, matching the cells that use it. The French edition already says both (QuantEcon/lecture-python-programming.fr#80). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The documentation-only corrections were verified as accurate against the file's own code cells and Python 3 naming, leaving no outstanding issues.
No open issues 🎉
What changed in this PR
This PR fixes two factual inaccuracies in the lectures/names.md lecture, as reported in #634. It corrects a Python 2 module reference and an IPython magic command name so the prose matches both current Python 3 and the lecture's own code cells. This is a documentation-only change with no code modifications, and it also unblocks the French/Chinese/Persian translation syncs from reverting an already-applied correction.
Changes:
- Updates the prose to reference IPython's
%runmagic instead of barerun, consistent with the%run mod.pycode cells in the same file. - Replaces the Python 2 module name
__builtin__with the Python 3builtinsmodule, while leaving the distinct__builtins__namespace references unchanged.
| File | Description |
|---|---|
| lectures/names.md | Corrects run → %run and __builtin__ → builtins in explanatory text to match Python 3 and the lecture's code cells |
No issues found; the changes are correct, consistent with the surrounding code, and complete.
Review effort: Balanced
✅ Translation sync completed (fr)Target repo: QuantEcon/lecture-python-programming.fr
|
✅ Translation sync completed (zh-cn)Target repo: QuantEcon/lecture-python-programming.zh-cn
|
✅ Translation sync completed (fa)Target repo: QuantEcon/lecture-python-programming.fa
|
Two small inaccuracies in
lectures/names.md, reported in #634:runcommand, …%runcommand, …__builtin__.builtinsmodule.__builtin__is the Python 2 name; Python 3.0 renamed the modulebuiltins. Barerunworks only because automagic is on, and the lecture's own cells use%run. No code changes.Why it matters for the translations. The French edition corrected both during native-editor review (QuantEcon/lecture-python-programming.fr#80), with the same wording as here. Until the English agrees, a sync that touches the adjacent bullet can revert the French
builtinscorrection. On merge, the sync opens anames.mdPR in each of the fr, zh-cn and fa editions: check that the fr one keeps Emile's wording.Closes #634
🤖 Generated with Claude Code