From 5c857c1d443df1d0d51cc652930e864948561a13 Mon Sep 17 00:00:00 2001 From: Christophe Nanteuil Date: Tue, 3 Jan 2023 13:56:35 +0100 Subject: [PATCH] replace last value by highest value for Flag Enum --- Doc/library/enum.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 25a6e1f0b61677..47d9e39305d0fd 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -807,9 +807,9 @@ Utilities and Decorators call an *Enum*'s :meth:`_generate_next_value_` to get an appropriate value. For *Enum* and *IntEnum* that appropriate value will be the last value plus one; for *Flag* and *IntFlag* it will be the first power-of-two greater - than the last value; for *StrEnum* it will be the lower-cased version of the - member's name. Care must be taken if mixing *auto()* with manually specified - values. + than the highest value; for *StrEnum* it will be the lower-cased version of + 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: