diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-10-05 01:13:18 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-10-05 01:13:18 (GMT) |
commit | 93d7dda914c95c6d011b09ab86e0364e8eac55fb (patch) | |
tree | e4907fe6a9af961d31db22c1aff8cdeffd4449af /Doc/library | |
parent | a3494785730c174dd4e826f35728aaa2a51cfaf1 (diff) | |
download | cpython-93d7dda914c95c6d011b09ab86e0364e8eac55fb.zip cpython-93d7dda914c95c6d011b09ab86e0364e8eac55fb.tar.gz cpython-93d7dda914c95c6d011b09ab86e0364e8eac55fb.tar.bz2 |
#19148: fix markup errors and wording in enum docs. Patch by Esa Peuha.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/enum.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 0c46e1c..9d9e46e 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -250,7 +250,7 @@ Equality comparisons are defined though:: True 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):: >>> Color.blue == 2 @@ -594,8 +594,8 @@ alias:: .. note:: 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 - no aliases allowed the :func:`unique` decorator can be used instead. + behaviors as well as disallowing aliases. If the only desired change is + disallowing aliases the :func:`unique` decorator can be used instead. Planet @@ -671,11 +671,11 @@ the member:: ... 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`_ - class above, those methods will show up in a :func:`dir` of the member, - but not of the class:: +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, +but not of the class:: >>> dir(Planet) ['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS', 'VENUS', '__class__', '__doc__', '__members__', '__module__'] |