Skip to content

Add python-comments-guide materials folder - #974

Merged
realpython-bot merged 2 commits into
masterfrom
maintenance/python-comments-guide-20261201
Dec 2, 2026
Merged

realpython-bot merged 2 commits into
masterfrom
maintenance/python-comments-guide-20261201

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Adds the companion code for Writing Comments in Python (Guide), which has had no materials folder. The files mirror the code as the full-update draft has it (draft admin: https://realpython.com/pbjt/blog/post/2446/change/), so readers who download them get what the updated article shows. A learner survey response from 2026-05-20 reported trouble downloading the source code for this tutorial.

  • One script per section: basics, multiline comments, outline comments, docstrings, and the smelly-comments example before and after the refactor.
  • The just do this SyntaxError demo, the Java block, and the bare return a fragment are left out because they're meant to fail.
  • Standard library only, so there's no requirements.txt. The README states the floor as Python 3.9, from the draft's minimum-python==3.9.

Card: https://trello.com/c/M1mg3O3X

Verified: ran every script on Python 3.15.2 and 3.9.25, and the output matches the article (co_consts shows the extra None on 3.14 and earlier, as the article says). ruff@0.14.1 format --check and ruff check pass, and so does dircheck.py.

🤖 Generated with Claude Code

@realpython-bot
realpython-bot merged commit 7dbce55 into master Dec 2, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/python-comments-guide-20261201 branch December 2, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant