https://github.com/python/cpython/commit/9d3814308805e0a254e08f230ed362e86e6185cb
commit: 9d3814308805e0a254e08f230ed362e86e6185cb
branch: main
author: Havmaagen <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2026-04-16T11:23:29+05:30
summary:
Docs: Fix typos and a comment in enum.rst (#148156)
files:
M Doc/library/enum.rst
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 3b9604c446f733..be7f59b0fce2a5 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -502,7 +502,7 @@ Data types
Using :class:`auto` with :class:`Enum` results in integers of increasing
value,
starting with ``1``.
- .. versionchanged:: 3.12 Added :ref:`enum-dataclass-support`
+ .. versionchanged:: 3.12 Added :ref:`enum-dataclass-support`.
.. method:: Enum._add_alias_
@@ -977,9 +977,9 @@ Utilities and decorators
*auto* can be used in place of a value. If used, the *Enum* machinery will
call an :class:`Enum`'s :meth:`~Enum._generate_next_value_` to get an
appropriate value.
- For :class:`Enum` and :class:`IntEnum` that appropriate value will be the
last value plus
- one; for :class:`Flag` and :class:`IntFlag` it will be the first
power-of-two greater
- than the highest value; for :class:`StrEnum` it will be the lower-cased
version of
+ For :class:`Enum` and :class:`IntEnum` that appropriate value will be the
highest value seen
+ plus one; for :class:`Flag` and :class:`IntFlag` it will be the first
power-of-two greater
+ than the highest value seen; for :class:`StrEnum` it will be the
lower-cased version of
the member's name. Care must be taken if mixing *auto()* with manually
specified values.
@@ -989,8 +989,8 @@ Utilities and decorators
* ``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)
+ * ``THIRD = [auto(), -3]`` will *not* work (``[<auto instance>, -3]`` is
used to
+ create the ``THIRD`` enum member)
.. versionchanged:: 3.11.1
@@ -1000,7 +1000,7 @@ Utilities and decorators
``_generate_next_value_`` can be overridden to customize the values used by
*auto*.
- .. note:: in 3.13 the default ``_generate_next_value_`` will always return
+ .. note:: In version 3.13 the default ``_generate_next_value_`` will always
return
the highest member value incremented by 1, and will fail if any
member is an incompatible type.
@@ -1010,7 +1010,7 @@ Utilities and decorators
enumerations. It allows member attributes to have the same names as members
themselves.
- .. note:: the *property* and the member must be defined in separate classes;
+ .. note:: The *property* and the member must be defined in separate classes;
for example, the *value* and *name* attributes are defined in the
*Enum* class, and *Enum* subclasses can define members with the
names ``value`` and ``name``.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]