Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e279e8 commit 868bab0Copy full SHA for 868bab0
1 file changed
Doc/library/enum.rst
@@ -310,12 +310,12 @@ Data Types
310
>>> class PowersOfThree(Enum):
311
... @staticmethod
312
... def _generate_next_value_(name, start, count, last_values):
313
- ... return (count + 1) * 3
+ ... return 3 ** (count + 1)
314
... FIRST = auto()
315
... SECOND = auto()
316
...
317
>>> PowersOfThree.SECOND.value
318
- 6
+ 9
319
320
.. method:: Enum.__init_subclass__(cls, **kwds)
321
0 commit comments