comparing datetime with date
sholden at flexal.cs.usyd.edu.au
Wed Sep 15 02:33:09 CEST 2004
On Wed, 15 Sep 2004 09:24:03 +1000,
Graeme Matthew <graeme.matthew at contrado.com.au> wrote:
> This is very interesting because if you continue further and coerce both to
> strings you get:
>>>> print str(y) == str(y)
Of course if you actually do:
>>>> print str(x) == str(y)
> '2004-09-14 06:43:15'
> Even though there string values are different they still match?
No, they only matched becuase you compared y with y :)
More information about the Python-list