Round-tripping datetime's str
Issue15873 [1] talks about adding the ability for datetime.datetime (and friends?) to accept a string to create the relevant object (and not just numbers). Thoughts? [1] http://bugs.python.org/issue15873 -- ~Ethan~
On Nov 1, 2013, at 14:51, Ethan Furman <ethan@stoneleaf.us> wrote:
Issue15873 [1] talks about adding the ability for datetime.datetime (and friends?) to accept a string to create the relevant object (and not just numbers).
Thoughts?
It looks like this is exactly what I just suggested on your other thread, except that the original version at the top of the feature request suggested doing it automatically in __new__, and it's only farther down the comments that people suggested a fromisoformat classmethod instead. So, as you might expect, I like this idea, but I like it as a classmethod rather than magically in __new__.
[1] http://bugs.python.org/issue15873
-- ~Ethan~ _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas
participants (2)
-
Andrew Barnert
-
Ethan Furman