Skip to content

Commit fc092d3

Browse files
committed
Move note for Enum member to API section
This changes moves a note for the Enum member `_generate_next_value_` from the `_sunder_` section to the API section. The intention is to let `_sunder_` section list all members but have the details in the API section.
1 parent 6c75719 commit fc092d3

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Doc/library/enum.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,16 @@ Data Types
363363
:last_values: A list of the previous values.
364364

365365
A *staticmethod* that is used to determine the next value returned by
366-
:class:`auto`::
366+
:class:`auto`.
367+
368+
.. note::
369+
For standard :class:`Enum` classes the next value chosen is the highest
370+
value seen incremented by one.
371+
372+
For :class:`Flag` classes the next value chosen will be the next highest
373+
power-of-two.
374+
375+
This method may be overridden, e.g.
367376

368377
>>> from enum import auto
369378
>>> class PowersOfThree(Enum):
@@ -939,14 +948,6 @@ Supported ``_sunder_`` names
939948
- :meth:`~Enum._generate_next_value_` -- used to get an appropriate value for
940949
an enum member; may be overridden
941950

942-
.. note::
943-
944-
For standard :class:`Enum` classes the next value chosen is the highest
945-
value seen incremented by one.
946-
947-
For :class:`Flag` classes the next value chosen will be the next highest
948-
power-of-two.
949-
950951
- :meth:`~Enum._add_alias_` -- adds a new name as an alias to an existing
951952
member.
952953
- :meth:`~Enum._add_value_alias_` -- adds a new value as an alias to an

0 commit comments

Comments
 (0)