[Python-ideas] Round-tripping datetime's str

Andrew Barnert abarnert at yahoo.com
Sat Nov 2 01:33:37 CET 2013


On Nov 1, 2013, at 14:51, Ethan Furman <ethan at 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 at python.org
> https://mail.python.org/mailman/listinfo/python-ideas


More information about the Python-ideas mailing list