summaryrefslogtreecommitdiffstats
path: root/Doc/library/enum.rst
diff options
context:
space:
mode:
authorAntoine <43954001+awecx@users.noreply.github.com>2019-08-20 01:41:31 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2019-08-20 01:41:31 (GMT)
commitd3c8d735147ccdde1f9bf18ba481da67564837bf (patch)
tree4ab821fcb5827174fe512a2a72a4ec7be08b167a /Doc/library/enum.rst
parentd13968b1be8f4c0035b0ea891ee0f0df026cbf6c (diff)
downloadcpython-d3c8d735147ccdde1f9bf18ba481da67564837bf.zip
cpython-d3c8d735147ccdde1f9bf18ba481da67564837bf.tar.gz
cpython-d3c8d735147ccdde1f9bf18ba481da67564837bf.tar.bz2
Minor documentation fixes on library/enum (GH-15234)
* Minor documentation fixes on library/enum
Diffstat (limited to 'Doc/library/enum.rst')
-rw-r--r--Doc/library/enum.rst9
1 files changed, 4 insertions, 5 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index d7d319a..1d6912a 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -383,8 +383,8 @@ enumeration, with the exception of special methods (:meth:`__str__`,
variable names listed in :attr:`_ignore_`.
Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__` then
-whatever value(s) were given to the enum member will be passed into those
-methods. See `Planet`_ for an example.
+any value(s) given to the enum member will be passed into those methods.
+See `Planet`_ for an example.
Restricted Enum subclassing
@@ -730,8 +730,7 @@ Some rules:
2. While :class:`Enum` can have members of any type, once you mix in an
additional type, all the members must have values of that type, e.g.
:class:`int` above. This restriction does not apply to mix-ins which only
- add methods and don't specify another data type such as :class:`int` or
- :class:`str`.
+ add methods and don't specify another type.
3. When another data type is mixed in, the :attr:`value` attribute is *not the
same* as the enum member itself, although it is equivalent and will compare
equal.
@@ -1054,7 +1053,7 @@ Supported ``_sunder_`` names
- ``_missing_`` -- a lookup function used when a value is not found; may be
overridden
-- ``_ignore_`` -- a list of names, either as a :func:`list` or a :func:`str`,
+- ``_ignore_`` -- a list of names, either as a :class:`list` or a :class:`str`,
that will not be transformed into members, and will be removed from the final
class
- ``_order_`` -- used in Python 2/3 code to ensure member order is consistent