mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-103056: [Enum] use staticmethod decorator for _gnv_ (GH-103231)
_gnv_ --> _generate_next_value_
This commit is contained in:
parent
c71756fa65
commit
810d365b5e
2 changed files with 4 additions and 0 deletions
|
|
@ -284,6 +284,7 @@ The values are chosen by :func:`_generate_next_value_`, which can be
|
|||
overridden::
|
||||
|
||||
>>> class AutoName(Enum):
|
||||
... @staticmethod
|
||||
... def _generate_next_value_(name, start, count, last_values):
|
||||
... return name
|
||||
...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue