Kaydet (Commit) 71095ea4 authored tarafından Brett Cannon's avatar Brett Cannon

The message for the exception when time.strptime was passed something other

than str did not output the type of the argument but the object itself.
üst 14f3ae27
......@@ -298,7 +298,7 @@ def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
for index, arg in enumerate([data_string, format]):
if not isinstance(arg, str):
msg = "strptime() argument {} must be str, not {}"
raise TypeError(msg.format(arg, index))
raise TypeError(msg.format(index, type(arg)))
global _TimeRE_cache, _regex_cache
with _cache_lock:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment