Skip to content

Commit 69d168d

Browse files
ethanfurmanmiss-islington
authored andcommitted
[Enum] fix typo (pythonGH-94158)
(cherry picked from commit b4e0d61) Co-authored-by: Ethan Furman <[email protected]>
1 parent cf3f8d4 commit 69d168d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Lib/enum.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1218,21 +1218,21 @@ def __new__(cls, value):
12181218
def __init__(self, *args, **kwds):
12191219
pass
12201220

1221-
def _generate_next_value_(name, start, count, last_value):
1221+
def _generate_next_value_(name, start, count, last_values):
12221222
"""
12231223
Generate the next value when not given.
12241224
12251225
name: the name of the member
12261226
start: the initial start value or None
12271227
count: the number of existing members
1228-
last_value: the list of values assigned
1228+
last_values: the list of values assigned
12291229
"""
1230-
if not last_value:
1230+
if not last_values:
12311231
return start
12321232
try:
1233-
last = last_value[-1]
1234-
last_value.sort()
1235-
if last == last_value[-1]:
1233+
last = last_values[-1]
1234+
last_values.sort()
1235+
if last == last_values[-1]:
12361236
# no difference between old and new methods
12371237
return last + 1
12381238
else:
@@ -1246,7 +1246,7 @@ def _generate_next_value_(name, start, count, last_value):
12461246
DeprecationWarning,
12471247
stacklevel=3,
12481248
)
1249-
for v in last_value:
1249+
for v in last_values:
12501250
try:
12511251
return v + 1
12521252
except TypeError:
@@ -1402,7 +1402,7 @@ def _generate_next_value_(name, start, count, last_values):
14021402
name: the name of the member
14031403
start: the initial start value or None
14041404
count: the number of existing members
1405-
last_value: the last value assigned or None
1405+
last_values: the last value assigned or None
14061406
"""
14071407
if not count:
14081408
return start if start is not None else 1

0 commit comments

Comments
 (0)