mirror of
https://github.com/python/cpython.git
synced 2025-12-11 03:20:01 +00:00
PEP 8 conformance: class_ -> cls
This commit is contained in:
parent
1f9dea0b5f
commit
4988d7a375
1 changed files with 3 additions and 3 deletions
|
|
@ -482,8 +482,8 @@ def _strptime_time(data_string, format="%a %b %d %H:%M:%S %Y"):
|
||||||
tt = _strptime(data_string, format)[0]
|
tt = _strptime(data_string, format)[0]
|
||||||
return time.struct_time(tt[:9])
|
return time.struct_time(tt[:9])
|
||||||
|
|
||||||
def _strptime_datetime(class_, data_string, format="%a %b %d %H:%M:%S %Y"):
|
def _strptime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"):
|
||||||
"""Return a class_ instance based on the input string and the
|
"""Return a class cls instance based on the input string and the
|
||||||
format string."""
|
format string."""
|
||||||
tt, fraction = _strptime(data_string, format)
|
tt, fraction = _strptime(data_string, format)
|
||||||
gmtoff, tzname = tt[-2:]
|
gmtoff, tzname = tt[-2:]
|
||||||
|
|
@ -496,4 +496,4 @@ def _strptime_datetime(class_, data_string, format="%a %b %d %H:%M:%S %Y"):
|
||||||
tz = datetime_timezone(tzdelta)
|
tz = datetime_timezone(tzdelta)
|
||||||
args += (tz,)
|
args += (tz,)
|
||||||
|
|
||||||
return class_(*args)
|
return cls(*args)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue