gh-100174: [Enum] Correct PowersOfThree example. (GH-100178)

Changed from multiples of 3 to powers of 3 to match the class name.
This commit is contained in:
Beweeted 2022-12-11 15:20:59 -08:00 committed by GitHub
parent 2e279e85fe
commit 868bab0fdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)