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
93d7dda9
Commit
93d7dda9
authored
Oct 05, 2013
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#19148: fix markup errors and wording in enum docs. Patch by Esa Peuha.
parent
a3494785
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
Doc/library/enum.rst
Doc/library/enum.rst
+7
-7
Misc/ACKS
Misc/ACKS
+1
-0
No files found.
Doc/library/enum.rst
View file @
93d7dda9
...
@@ -250,7 +250,7 @@ Equality comparisons are defined though::
...
@@ -250,7 +250,7 @@ Equality comparisons are defined though::
True
True
Comparisons against non-enumeration values will always compare not equal
Comparisons against non-enumeration values will always compare not equal
(again, class:`IntEnum` was explicitly designed to behave differently, see
(again,
:
class:`IntEnum` was explicitly designed to behave differently, see
below)::
below)::
>>> Color.blue == 2
>>> Color.blue == 2
...
@@ -594,8 +594,8 @@ alias::
...
@@ -594,8 +594,8 @@ alias::
.. note::
.. note::
This is a useful example for subclassing Enum to add or change other
This is a useful example for subclassing Enum to add or change other
behaviors as well as disallowing aliases. If the only
change desired
is
behaviors as well as disallowing aliases. If the only
desired change
is
no aliases allowed
the :func:`unique` decorator can be used instead.
disallowing aliases
the :func:`unique` decorator can be used instead.
Planet
Planet
...
@@ -671,11 +671,11 @@ the member::
...
@@ -671,11 +671,11 @@ the member::
...
...
AttributeError: 'Color' object has no attribute 'blue'
AttributeError: 'Color' object has no attribute 'blue'
Likewise, the :attr:`__members__` is only available on the class.
Likewise, the :attr:`__members__` is only available on the class.
If you give your :class:`Enum` subclass extra methods, like the `Planet`_
If you give your :class:`Enum` subclass extra methods, like the `Planet`_
class above, those methods will show up in a :func:`dir` of the member,
class above, those methods will show up in a :func:`dir` of the member,
but not of the class::
but not of the class::
>>> dir(Planet)
>>> dir(Planet)
['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', 'VENUS', '__class__', '__doc__', '__members__', '__module__']
['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', 'VENUS', '__class__', '__doc__', '__members__', '__module__']
...
...
Misc/ACKS
View file @
93d7dda9
...
@@ -988,6 +988,7 @@ Chris Petrilli
...
@@ -988,6 +988,7 @@ Chris Petrilli
Roumen Petrov
Roumen Petrov
Bjorn Pettersen
Bjorn Pettersen
Justin D. Pettit
Justin D. Pettit
Esa Peuha
Ronny Pfannschmidt
Ronny Pfannschmidt
Geoff Philbrick
Geoff Philbrick
Gavrie Philipson
Gavrie Philipson
...
...
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