mirror of https://github.com/python/cpython
gh-92120: The docstring of enum.Enum is invalid in reST (GH-92122)
Closes #92120
This commit is contained in:
parent
dc8a86893d
commit
90d5c9b195
14
Lib/enum.py
14
Lib/enum.py
|
@ -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:
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix reStructuredText syntax errors in docstrings in the :mod:`enum` module.
|
Loading…
Reference in New Issue