From ff22ae3f62f075771e4e373dcedbd7d4d6346d85 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 31 Jul 2025 14:36:39 -0700 Subject: [PATCH] update enum docs --- Doc/library/enum.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index c9b2c7d76b6746..4483e451ffd5fd 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -913,12 +913,13 @@ Utilities and Decorators the member's name. Care must be taken if mixing *auto()* with manually specified values. - *auto* instances are only resolved when at the top level of an assignment: + *auto* instances are only resolved when at the top level of an assignment, either by + itself or as part of a tuple: * ``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 (``, -3`` is used to + * ``THREE = [auto(), -3]`` will *not* work (``[, -3]``) is used to create the ``THREE`` enum member) .. versionchanged:: 3.11.1