Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d3c8d735
Commit
d3c8d735
authored
Aug 20, 2019
by
Antoine
Committed by
Ethan Furman
Aug 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor documentation fixes on library/enum (GH-15234)
* Minor documentation fixes on library/enum
parent
d13968b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Doc/library/enum.rst
Doc/library/enum.rst
+4
-5
Misc/ACKS
Misc/ACKS
+1
-0
No files found.
Doc/library/enum.rst
View file @
d3c8d735
...
...
@@ -383,8 +383,8 @@ enumeration, with the exception of special methods (:meth:`__str__`,
variable names listed in :attr:`_ignore_`.
Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__` then
whatever value(s) were given to the enum member will be passed into those
methods.
See `Planet`_ for an example.
any value(s) given to the enum member will be passed into those methods.
See `Planet`_ for an example.
Restricted Enum subclassing
...
...
@@ -730,8 +730,7 @@ Some rules:
2. While :class:`Enum` can have members of any type, once you mix in an
additional type, all the members must have values of that type, e.g.
:class:`int` above. This restriction does not apply to mix-ins which only
add methods and don't specify another data type such as :class:`int` or
:class:`str`.
add methods and don't specify another type.
3. When another data type is mixed in, the :attr:`value` attribute is *not the
same* as the enum member itself, although it is equivalent and will compare
equal.
...
...
@@ -1054,7 +1053,7 @@ Supported ``_sunder_`` names
- ``_missing_`` -- a lookup function used when a value is not found; may be
overridden
- ``_ignore_`` -- a list of names, either as a :
func:`list` or a :func
:`str`,
- ``_ignore_`` -- a list of names, either as a :
class:`list` or a :class
:`str`,
that will not be transformed into members, and will be removed from the final
class
- ``_order_`` -- used in Python 2/3 code to ensure member order is consistent
...
...
Misc/ACKS
View file @
d3c8d735
...
...
@@ -1771,6 +1771,7 @@ Steve Weber
Corran Webster
Glyn Webster
Phil Webster
Antoine Wecxsteen
Stefan Wehr
Zack Weinberg
Bob Weiner
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment