summaryrefslogtreecommitdiff
path: root/Lib/_strptime.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-03-31 03:58:04 +0000
committerBrett Cannon <bcannon@gmail.com>2009-03-31 03:58:04 +0000
commit6729598ea0ec49c5ce7656fcad8bef3037a1797f (patch)
tree1d5fac5f272f610656348eedd314ea1634e616d5 /Lib/_strptime.py
parenta5caa1f8f9b08b5aec02f2c1f01117b63264d6b2 (diff)
downloadcpython-6729598ea0ec49c5ce7656fcad8bef3037a1797f.tar.gz
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.
Diffstat (limited to 'Lib/_strptime.py')
-rw-r--r--Lib/_strptime.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_strptime.py b/Lib/_strptime.py
index 9ff29bce8f..ee30b4216c 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: