From 558fd6190d99f668c2a32e6c1dbf486dd3d87806 Mon Sep 17 00:00:00 2001 From: literally Date: Tue, 18 Nov 2025 15:09:13 +0300 Subject: [PATCH] use %r instead of %s in error messages #141540 --- Lib/_strptime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/_strptime.py b/Lib/_strptime.py index d011ddf8b181c3..90566fbd00821e 100644 --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -567,7 +567,7 @@ def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"): raise ValueError( f"Missing colon in %:z before '{rest}', got '{data_string}'" ) - raise ValueError("unconverted data remains: %s" % rest) + raise ValueError("unconverted data remains: %r" % rest) iso_year = year = None month = day = 1