[issue1100942] Add datetime.time.strptime and datetime.date.strptime
Sean Reifschneider
report at bugs.python.org
Tue Mar 19 02:08:07 CET 2013
Sean Reifschneider added the comment:
I've tried to test this but v4 doesn't apply cleanly after pure2 is applied, and v4 doesn't include enough to test it (applying v4 only causes test failures).
I reviewed v4 and it looks fine in general. I do see that there are changes in it unrelated to this issue, but they are PEP8 changes so I'm not objecting, but ideally that would be split out into a separate patch.
I think that this code will incorrectly detect something like '%s %%wall clock' as a date spec because it contains '%w', but strptime would consider that '%' followed by the string 'wall'. A subtle edge case, but worth considering. Maybe it needs to strip out %% first then look for the % sequences? Or perhaps just do the conversion and if the Y/M/D fields are set in then decide that it included a date spec, or if the HMS are set then say that it has the time spec included?
----------
nosy: +jafo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1100942>
_______________________________________
More information about the Python-bugs-list
mailing list