-
-
Notifications
You must be signed in to change notification settings - Fork 33k
gh-139487: doc(enum): add missing imports for standalone doctest examples #139488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I would have rejected this PR if other examples weren't already written with executability in mind but in this case, we only complete what is incomplete so it is fine. |
Thanks for the quick review—much appreciated! I agree. Minimal imports help readers run the examples more easily. |
…amples (pythonGH-139488) (cherry picked from commit f3d7fae) Co-authored-by: Peter <[email protected]>
…amples (pythonGH-139488) (cherry picked from commit f3d7fae) Co-authored-by: Peter <[email protected]>
GH-139493 is a backport of this pull request to the 3.14 branch. |
GH-139494 is a backport of this pull request to the 3.13 branch. |
Several examples in
Doc/library/enum.rst
are meant to be runnable as standalone doctest-style blocks. This PR adds the minimalfrom enum import ...
lines so each block runs when copied in isolation.The current documentation is correct; this change simply improves convenience for newcomers and first-time readers.
Notes
📚 Documentation preview 📚: https://cpython-previews--139488.org.readthedocs.build/