Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
gh-107957: Fix dir() sample output in enum docs#107958
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
70c108977269f80dc0ab7bca1c3620cbcd398d0f2d2e067a4848dd18722550fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1051,9 +1051,13 @@ class below, those methods will show up in a :func:`dir` of the member, | ||||||||
| but not of the class:: | ||||||||
| >>> dir(Planet) # doctest: +SKIP | ||||||||
| ['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', 'VENUS', '__class__', '__doc__', '__members__', '__module__'] | ||||||||
| ['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', 'VENUS', '__class__', '__contains__', '__doc__', '__getitem__', '__init_subclass__', '__iter__', '__len__', '__members__', '__module__', '__name__', '__qualname__'] | ||||||||
| >>> dir(Planet.EARTH) # doctest: +SKIP | ||||||||
| ['__class__', '__doc__', '__module__', 'mass', 'name', 'radius', 'surface_gravity', 'value'] | ||||||||
| ['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', 'VENUS', '__class__', '__doc__', '__eq__', '__hash__', '__module__', 'mass', 'name', 'radius', 'surface_gravity', 'value'] | ||||||||
| .. versionchanged:: 3.11 | ||||||||
| Additional ``__dunder__`` names are returned for enums and enum members. | ||||||||
| Calling :func:`dir` on an enum member also returns the other members. | ||||||||
Comment on lines
+1058
to
+1060
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need versionchanged in a How To document
Suggested change
Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I remove it? Note that there are 13 other occurrences of versionadded/versionchanged in the document | ||||||||
| Combining members of ``Flag`` | ||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1562,6 +1562,7 @@ Liam Routt | ||
| Todd Rovito | ||
| Craig Rowland | ||
| Clinton Roy | ||
| Ujan RoyBandyopadhyay | ||
| Paul Rubin | ||
| Sam Ruby | ||
| Demur Rumed | ||
Uh oh!
There was an error while loading. Please reload this page.