Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
bpo-1100942: Add datetime.time.strptime and datetime.date.strptime #5578
Add datetime.date.strptime and datetime.time.strptime.
Fix the documentation of _strptime._strptime, the documentation was
Co-authored-by: Alexander Belopolsky email@example.com
I haven't had a chance to look at the PR thoroughly, but I have a first-pass review of things that should be changed.
I also haven't checked exactly how you are doing it, but I believe we may want to / be able to refactor the tests a bit to take advantage of the existing test suite for
datetime.strptime by separating out the
time-only formats and reusing the tests with
Additionally, I should note that it's unfortunate that if this is merged, we'll have
datetime.time.strptime, the first of which returns a timetuple (which is actually more like a datetime), and the second returning a
datetime.time object. I don't see any way around this, but it will add confusion. :(