Skip to content

Sync python-double-underscore with the updated tutorial - #901

Merged
realpython-bot merged 2 commits into
masterfrom
maintenance/python-double-underscore-20261021
Oct 22, 2026
Merged

realpython-bot merged 2 commits into
masterfrom
maintenance/python-double-underscore-20261021

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Maintenance sync for Single and Double Underscores in Python Names.

What changed

  • mangling.py: dropped the trailing space inside the "A.__attr = " and "B.__attr = " string literals. print() adds its own separator, so the code printed A.__attr = 0 (two spaces) while the tutorial shows A.__attr = 0. The update draft applies the same fix to the article's code block.

Links

Verification

  • Ran every script in the folder on Python 3.14.6: all exit cleanly, and mangling.py now prints A.__attr = 0 / B.__attr = 1, matching the article.
  • uvx ruff@0.14.1 format --check python-double-underscore: 7 files already formatted
  • uvx ruff@0.14.1 check python-double-underscore: All checks passed

🤖 Generated with Claude Code

realpython-bot and others added 2 commits October 21, 2026 06:06
@realpython-bot
realpython-bot merged commit 3322f52 into master Oct 22, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/python-double-underscore-20261021 branch October 22, 2026 07:07
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