diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-03-31 03:58:04 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-03-31 03:58:04 (GMT) |
commit | 71095ea4ce1b8584d89047f2256b183d40cc9d35 (patch) | |
tree | 028192d278feeead27a14c1423dd1967733e90e8 | |
parent | 14f3ae2723e6b901906022bd34e012b27a27df07 (diff) | |
download | cpython-71095ea4ce1b8584d89047f2256b183d40cc9d35.zip cpython-71095ea4ce1b8584d89047f2256b183d40cc9d35.tar.gz cpython-71095ea4ce1b8584d89047f2256b183d40cc9d35.tar.bz2 |
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.
-rw-r--r-- | Lib/_strptime.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_strptime.py b/Lib/_strptime.py index 9ff29bc..ee30b42 100644 --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -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: |