Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93d7dda

Browse files
committed
#19148: fix markup errors and wording in enum docs. Patch by Esa Peuha.
1 parent a349478 commit 93d7dda

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

Doc/library/enum.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Equality comparisons are defined though::
250250
True
251251

252252
Comparisons against non-enumeration values will always compare not equal
253-
(again, class:`IntEnum` was explicitly designed to behave differently, see
253+
(again, :class:`IntEnum` was explicitly designed to behave differently, see
254254
below)::
255255

256256
>>> Color.blue == 2
@@ -594,8 +594,8 @@ alias::
594594
.. note::
595595

596596
This is a useful example for subclassing Enum to add or change other
597-
behaviors as well as disallowing aliases. If the only change desired is
598-
no aliases allowed the :func:`unique` decorator can be used instead.
597+
behaviors as well as disallowing aliases. If the only desired change is
598+
disallowing aliases the :func:`unique` decorator can be used instead.
599599

600600

601601
Planet
@@ -671,11 +671,11 @@ the member::
671671
...
672672
AttributeError: 'Color' object has no attribute 'blue'
673673

674-
Likewise, the :attr:`__members__` is only available on the class.
674+
Likewise, the :attr:`__members__` is only available on the class.
675675

676-
If you give your :class:`Enum` subclass extra methods, like the `Planet`_
677-
class above, those methods will show up in a :func:`dir` of the member,
678-
but not of the class::
676+
If you give your :class:`Enum` subclass extra methods, like the `Planet`_
677+
class above, those methods will show up in a :func:`dir` of the member,
678+
but not of the class::
679679

680680
>>> dir(Planet)
681681
['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', 'VENUS', '__class__', '__doc__', '__members__', '__module__']

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,7 @@ Chris Petrilli
988988
Roumen Petrov
989989
Bjorn Pettersen
990990
Justin D. Pettit
991+
Esa Peuha
991992
Ronny Pfannschmidt
992993
Geoff Philbrick
993994
Gavrie Philipson

0 commit comments

Comments
 (0)