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
e2563462
Commit
e2563462
authored
Jun 28, 2013
by
Ethan Furman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added rationale for defaulting to 1 in the functional API.
parent
b1c68274
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Doc/library/enum.rst
Doc/library/enum.rst
+4
-0
No files found.
Doc/library/enum.rst
View file @
e2563462
...
@@ -335,6 +335,10 @@ assignment to :class:`Animal` is equivalent to::
...
@@ -335,6 +335,10 @@ assignment to :class:`Animal` is equivalent to::
... cat = 3
... cat = 3
... dog = 4
... dog = 4
The reason for defaulting to ``1`` as the starting number and not ``0`` is
that ``0`` is ``False`` in a boolean sense, but enum members all evaluate
to ``True``.
Pickling enums created with the functional API can be tricky as frame stack
Pickling enums created with the functional API can be tricky as frame stack
implementation details are used to try and figure out which module the
implementation details are used to try and figure out which module the
enumeration is being created in (e.g. it will fail if you use a utility
enumeration is being created in (e.g. it will fail if you use a utility
...
...
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