Unclear datetime.date type when using isinstance

2010-10-02 Thread Mailing List
Was including a input check on a function argument which is expecting a datetime.date. When running unittest no exception was raised when a datetime.datetime instance was used as argument. Some playing with the console lead to this: import datetime dt1 = datetime.datetime(2010, 10, 2)

Re: Unclear datetime.date type when using isinstance

2010-10-02 Thread Chris Rebert
On Sat, Oct 2, 2010 at 5:12 AM, Mailing List li...@fastmail.net wrote: Was including a input check on a function argument which is expecting a datetime.date. When running unittest no exception was raised when a datetime.datetime instance was used as argument. Some playing with the console lead

Re: Unclear datetime.date type when using isinstance

2010-10-02 Thread Diez B. Roggisch
Mailing List li...@fastmail.net writes: Was including a input check on a function argument which is expecting a datetime.date. When running unittest no exception was raised when a datetime.datetime instance was used as argument. Some playing with the console lead to this: import datetime