summaryrefslogtreecommitdiffstats
path: root/Doc/library/enum.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/enum.rst')
-rw-r--r--Doc/library/enum.rst28
1 files changed, 14 insertions, 14 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 7653865..487dace 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -597,8 +597,8 @@ Data Types
If a *Flag* operation is performed with an *IntFlag* member and:
- * the result is a valid *IntFlag*: an *IntFlag* is returned
- * the result is not a valid *IntFlag*: the result depends on the *FlagBoundary* setting
+ * the result is a valid *IntFlag*: an *IntFlag* is returned
+ * the result is not a valid *IntFlag*: the result depends on the *FlagBoundary* setting
The *repr()* of unnamed zero-valued flags has changed. It is now:
@@ -625,8 +625,8 @@ Data Types
:class:`!ReprEnum` uses the :meth:`repr() <Enum.__repr__>` of :class:`Enum`,
but the :class:`str() <str>` of the mixed-in data type:
- * :meth:`!int.__str__` for :class:`IntEnum` and :class:`IntFlag`
- * :meth:`!str.__str__` for :class:`StrEnum`
+ * :meth:`!int.__str__` for :class:`IntEnum` and :class:`IntFlag`
+ * :meth:`!str.__str__` for :class:`StrEnum`
Inherit from :class:`!ReprEnum` to keep the :class:`str() <str>` / :func:`format`
of the mixed-in data type instead of using the
@@ -789,13 +789,13 @@ Supported ``_sunder_`` names
- ``_generate_next_value_`` -- used to get an appropriate value for an enum
member; may be overridden
- .. note::
+ .. note::
- For standard :class:`Enum` classes the next value chosen is the last value seen
- incremented by one.
+ For standard :class:`Enum` classes the next value chosen is the last value seen
+ incremented by one.
- For :class:`Flag` classes the next value chosen will be the next highest
- power-of-two, regardless of the last value seen.
+ For :class:`Flag` classes the next value chosen will be the next highest
+ power-of-two, regardless of the last value seen.
.. versionadded:: 3.6 ``_missing_``, ``_order_``, ``_generate_next_value_``
.. versionadded:: 3.7 ``_ignore_``
@@ -817,11 +817,11 @@ Utilities and Decorators
*auto* instances are only resolved when at the top level of an assignment:
- * ``FIRST = auto()`` will work (auto() is replaced with ``1``);
- * ``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` is
- used to create the ``SECOND`` enum member;
- * ``THREE = [auto(), -3]`` will *not* work (``<auto instance>, -3`` is used to
- create the ``THREE`` enum member)
+ * ``FIRST = auto()`` will work (auto() is replaced with ``1``);
+ * ``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` is
+ used to create the ``SECOND`` enum member;
+ * ``THREE = [auto(), -3]`` will *not* work (``<auto instance>, -3`` is used to
+ create the ``THREE`` enum member)
.. versionchanged:: 3.11.1