[issue22058] datetime.datetime() should accept a datetime.date as init parameter

R. David Murray report at bugs.python.org
Thu Jul 24 17:33:15 CEST 2014


R. David Murray added the comment:

There is already a spelling for that operation, and it is d.date().  I'm not sure that there is a strong enough argument for adding a second way to spell it, but I won't close this yet to see what other people think.  

Personally I don't think it has ever occurred to me to do date(datetime) (although I have wanted to pass a string to the constructor), and I've wanted the operation and found the 'date()' method more than once.

----------
nosy: +belopolsky, r.david.murray

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


More information about the Python-bugs-list mailing list