Skip to content

Commit

Permalink
[3.11] gh-100174: Fix math in PowersOfThree example class.
Browse files Browse the repository at this point in the history
Changed from multiples of 3 to powers of 3 to match the class name.
  • Loading branch information
Beweeted authored Dec 11, 2022
1 parent 2e279e8 commit 660d462
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,12 @@ Data Types
>>> class PowersOfThree(Enum):
... @staticmethod
... def _generate_next_value_(name, start, count, last_values):
... return (count + 1) * 3
... return 3 ** (count + 1)
... FIRST = auto()
... SECOND = auto()
...
>>> PowersOfThree.SECOND.value
6
9

.. method:: Enum.__init_subclass__(cls, **kwds)

Expand Down

0 comments on commit 660d462

Please sign in to comment.