From 4645203739e6b1385fb8725419dafdc43daa565a Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 18 Dec 2025 10:31:37 -0800 Subject: [PATCH] gh-118342: [Enum] update docs (GH-137290) (cherry picked from commit e79c39101a9f55882f54df0bb3ecfa23238692de) Co-authored-by: Ethan Furman Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- 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 faf8f88934ac54..f559659ab6056d 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -947,12 +947,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