Skip to content

Commit ff22ae3

Browse files
committed
update enum docs
1 parent 49365bd commit ff22ae3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/enum.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,12 +913,13 @@ Utilities and Decorators
913913
the member's name. Care must be taken if mixing *auto()* with manually
914914
specified values.
915915

916-
*auto* instances are only resolved when at the top level of an assignment:
916+
*auto* instances are only resolved when at the top level of an assignment, either by
917+
itself or as part of a tuple:
917918

918919
* ``FIRST = auto()`` will work (auto() is replaced with ``1``);
919920
* ``SECOND = auto(), -2`` will work (auto is replaced with ``2``, so ``2, -2`` is
920921
used to create the ``SECOND`` enum member;
921-
* ``THREE = [auto(), -3]`` will *not* work (``<auto instance>, -3`` is used to
922+
* ``THREE = [auto(), -3]`` will *not* work (``[<auto instance>, -3]``) is used to
922923
create the ``THREE`` enum member)
923924

924925
.. versionchanged:: 3.11.1

0 commit comments

Comments
 (0)