[Python-Dev] iso8601 parsing
Chris Barker - NOAA Federal
chris.barker at noaa.gov
Fri Dec 8 18:50:29 EST 2017
On Dec 7, 2017, at 7:52 PM, Mike Miller <python-dev at mgmiller.net> wrote:
Guess the argument for limiting what it accepts would be that every funky
variation will need to be supported until the endtimes, even those of
little use or utility.
I suppose so, but not that hard once implemented and tests in place.
How about this for a “practicality beats purity” approach:
.fromiso() will parse the most commonly used iso8601 compliant date time
strings.
It is guaranteed to properly parse the output of .isoformat()
It is Not a validator — it may except non-iso compliant strings, and may
give surprising results when passed such.
<end/>
In any case, I sure hope it will accept iso strings both with and without
the “T”.
But again: Paul, do whatever you think is best.
-CHB
On the other hand, it might be good to keep the two implementations the
same for consistency reasons.
Thanks either way,
-Mike
On 2017-12-07 17:57, Chris Barker - NOAA Federal wrote:
_______________________________________________
Python-Dev mailing list
Python-Dev at python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171208/6e3906e5/attachment-0001.html>
More information about the Python-Dev
mailing list