Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb4e0d61

Browse files
authored
[Enum] fix typo (GH-94158)
1 parent5b6e576 commitb4e0d61

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎Lib/enum.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,21 +1205,21 @@ def __new__(cls, value):
12051205
def__init__(self,*args,**kwds):
12061206
pass
12071207

1208-
def_generate_next_value_(name,start,count,last_value):
1208+
def_generate_next_value_(name,start,count,last_values):
12091209
"""
12101210
Generate the next value when not given.
12111211
12121212
name: the name of the member
12131213
start: the initial start value or None
12141214
count: the number of existing members
1215-
last_value: the list of values assigned
1215+
last_values: the list of values assigned
12161216
"""
1217-
ifnotlast_value:
1217+
ifnotlast_values:
12181218
returnstart
12191219
try:
1220-
last=last_value[-1]
1221-
last_value.sort()
1222-
iflast==last_value[-1]:
1220+
last=last_values[-1]
1221+
last_values.sort()
1222+
iflast==last_values[-1]:
12231223
# no difference between old and new methods
12241224
returnlast+1
12251225
else:
@@ -1233,7 +1233,7 @@ def _generate_next_value_(name, start, count, last_value):
12331233
DeprecationWarning,
12341234
stacklevel=3,
12351235
)
1236-
forvinlast_value:
1236+
forvinlast_values:
12371237
try:
12381238
returnv+1
12391239
exceptTypeError:
@@ -1389,7 +1389,7 @@ def _generate_next_value_(name, start, count, last_values):
13891389
name: the name of the member
13901390
start: the initial start value or None
13911391
count: the number of existing members
1392-
last_value: the last value assigned or None
1392+
last_values: the last value assigned or None
13931393
"""
13941394
ifnotcount:
13951395
returnstartifstartisnotNoneelse1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp