Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Lib/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,20 +1054,20 @@ class Enum(metaclass=EnumType):

Access them by:

- attribute access::
- attribute access:

>>> Color.RED
<Color.RED: 1>
>>> Color.RED
<Color.RED: 1>

- value lookup:

>>> Color(1)
<Color.RED: 1>
>>> Color(1)
<Color.RED: 1>

- name lookup:

>>> Color['RED']
<Color.RED: 1>
>>> Color['RED']
<Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix reStructuredText syntax errors in docstrings in the :mod:`enum` module.