[issue1100942] Add datetime.time.strptime and datetime.date.strptime

Alexander Belopolsky report at bugs.python.org
Tue Apr 20 18:12:38 CEST 2010


Alexander Belopolsky <alexander.belopolsky at gmail.com> added the comment:

BTW, it does not bother me that "date.strptime() 
seems a bit odd, given that it cannot accept a time part."  To me "time" in strptime means time specification that may include date, time or even just month.  If parsed specification does not fit in date (includes time component), date.strptime fails.  There is nothing wrong with it.  An alternative would be to make {date,time}.strptime() promiscuous and just drop unneeded components, but that would make these functions less useful because such behavior is simply datetime.strptime(..).{date,time}().

----------

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


More information about the Python-bugs-list mailing list