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
01cc2d5f
Commit
01cc2d5f
authored
Mar 03, 2014
by
Ethan Furman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue20653: fix ReST for Enum
parent
2da95046
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Doc/library/enum.rst
Doc/library/enum.rst
+10
-10
No files found.
Doc/library/enum.rst
View file @
01cc2d5f
...
@@ -425,7 +425,7 @@ The solution is to specify the module name explicitly as follows::
...
@@ -425,7 +425,7 @@ The solution is to specify the module name explicitly as follows::
.. warning::
.. warning::
If
:param module:
is not supplied, and Enum cannot determine what it is,
If
``module``
is not supplied, and Enum cannot determine what it is,
the new Enum members will not be unpicklable; to keep errors closer to
the new Enum members will not be unpicklable; to keep errors closer to
the source, pickling will be disabled.
the source, pickling will be disabled.
...
@@ -440,26 +440,26 @@ The complete signature is::
...
@@ -440,26 +440,26 @@ The complete signature is::
Enum(value='NewEnumName', names=<...>, *, module='...', qualname='...', type=<mixed-in class>)
Enum(value='NewEnumName', names=<...>, *, module='...', qualname='...', type=<mixed-in class>)
:
param
value: What the new Enum class will record as its name.
:value: What the new Enum class will record as its name.
:
param names: The Enum members. This can be a whitespace or comma seperated
:
names: The Enum members. This can be a whitespace or comma seperated string
string
::
(values will start at 1)
::
'red green blue'
, 'red,green,blue',
'red, green, blue'
'red green blue'
| 'red,green,blue' |
'red, green, blue'
(values will start at 1), or an iterator of name, value
pairs::
or an iterator of (name, value)
pairs::
[('cyan', 4), ('magenta', 5), ('yellow', 6)]
[('cyan', 4), ('magenta', 5), ('yellow', 6)]
or a mapping::
or a mapping::
{'chartruese': 7, 'sea_green': 11, 'rosemary': 42}
{'chartruese': 7, 'sea_green': 11, 'rosemary': 42}
:
param
module: name of module where new Enum class can be found.
:module: name of module where new Enum class can be found.
:
param
qualname: where in module new Enum class can be found.
:qualname: where in module new Enum class can be found.
:
param
type: type to mix in to new Enum class.
:type: type to mix in to new Enum class.
Derived Enumerations
Derived Enumerations
...
...
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