[issue37962] Improve ISO 8601 timezone support in the datetime.fromisoformat() method

Zeth report at bugs.python.org
Wed Aug 28 01:36:13 EDT 2019


Zeth <theology at gmail.com> added the comment:

Did you read the attached PR? For three lines longer, the method becomes more generally useful now.

As pointed out in the other thread that you pointed to, Javascript can parse Python's seralised datetime object but Python cannot parse Javascript's due to the fact that you don't want to.

That other thread points to a third thread that starts in 2012 so it seems that you really think that is a feature rather than a bug.

The name of the method is fromisoformat, not "parse our internal home made format". The line in the documentation seems a bit weird to me to be honest. It is saying that we could make it generally useful for you user but we don't want to.

The reply to this bug, "use the dateutil.parser.isoparse that I maintain instead" is beside the point, we are talking about the standard library one. Why not put that in the standard library then if it can actually parse iso 8601 format?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37962>
_______________________________________


More information about the Python-bugs-list mailing list