Skip to content

gh-54643: Document the rules for public names in the tutorial - #155344

Open
Phantom0299 wants to merge 1 commit into
python:mainfrom
Phantom0299:docs-update
Open

gh-54643: Document the rules for public names in the tutorial#155344
Phantom0299 wants to merge 1 commit into
python:mainfrom
Phantom0299:docs-update

Conversation

@Phantom0299

@Phantom0299 Phantom0299 commented Aug 7, 2026

Copy link
Copy Markdown

Fixes #54643

This PR adds a new section to modules.rst to clearly document the PEP 8 guidelines for public and private names.
As discussed in the issue, this moves the definition out of the dense language reference and into the tutorial so it is much easier for everyday users to find.

The update clarifies three key rules:
1-How all explicitly defines a public API.
2-The fallback behavior for names without an _ prefix.
3-The rule that imported modules remain private.

Let me know if any of the wording needs to be tweaked!
📚 Documentation preview 📚: https://cpython-previews--.org.readthedocs.build/

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33961232 | 📁 Comparing 7e814f5 against main (7c653e2)

  🔍 Preview build  

2 files changed
± tutorial/index.html
± tutorial/modules.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Document the rules for "public names"

1 participant