[issue15873] datetime: add ability to parse RFC 3339 dates and times

Martin Panter report at bugs.python.org
Wed Feb 17 20:46:16 EST 2016


Martin Panter added the comment:

Hi Aymeric Augustin. I am guessing you are the original author of the code and tests in Django for parsing datetime strings (https://bugs.python.org/issue15873#msg260342). If so, would you be happy for it to be incorporated into Python?

Mathieu: I left a couple quick review comments. (Normally I leave a message in the main bug thread, but I forgot the other time.)

Doc strings: Generally I think we keep the doc strings to a minimum, and leave the main documentation for the RST files. For the RST documentation, I would suggest including a rough summary of the format. E.g. for time.fromisoformat(), something like “The string should be in the RFC’s ‘full-time’ format, which looks like HH:MM:SS[.mmmmmm][Z|±HH:MM].”

Now that you added the two new regex strings, I can see that it might be useful to keep them together, rather than next to each class. Or you could even make them class attributes. No strong opinions either way; whatever works for you I think.

----------
nosy: +aymeric.augustin

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15873>
_______________________________________


More information about the Python-bugs-list mailing list