Skip to content

gh-141540: Improve strptime error message for unconverted data - #157832

Open
vasiliyk wants to merge 2 commits into
python:mainfrom
vasiliyk:gh-141540-strptime
Open

vasiliyk wants to merge 2 commits into
python:mainfrom
vasiliyk:gh-141540-strptime

Conversation

@vasiliyk

@vasiliyk vasiliyk commented Sep 20, 2026

Copy link
Copy Markdown

The "unconverted data remains" error message used %s, so a trailing newline in the input was not visible.
Use !r instead, and format the neighbouring messages in _strptime() the same way.

Comment thread Lib/_strptime.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants