Shabda Raaj sha...@agiliq.com writes:
I'd expect it to be False. There will be a small amount of time between
the two invocations and the time will change
Ok, that makes sense. Should have written a better test case. What about
this.
datetime.datetime(2013, 1, 1) == datetime.date(2013, 1,
Noufal Ibrahim nou...@nibrahim.net.in writes:
Shabda Raaj sha...@agiliq.com writes:
I'd expect it to be False. There will be a small amount of time between
the two invocations and the time will change
Ok, that makes sense. Should have written a better test case. What about
this.
See this:
In [3]: OrderedDict(a=1) == {a: 1}
Out[3]: True
Today (10/Sep) is not equal to right now (10/Sep, 11:28 am).
Makes sense no?
True, but datetime.date(2013, 1, 1) == datetime.datetime(2013, 1, 1)
should still get me true. (The argument being, date.__eq__ should
only care about the
Shabda Raaj sha...@agiliq.com writes:
See this:
In [3]: OrderedDict(a=1) == {a: 1}
Out[3]: True
Today (10/Sep) is not equal to right now (10/Sep, 11:28 am).
Makes sense no?
True, but datetime.date(2013, 1, 1) == datetime.datetime(2013, 1, 1)
should still get me true. (The argument
Eg: See this:
http://nbviewer.ipython.org/5151306
I was expecting datetime.date.today() == datetime.datetime.today()
to give me a True. (It is false).
For example this works as I expect:
http://nbviewer.ipython.org/5151398
However looks like __eq__ is doing a isinstance check - I would
Shabda Raaj sha...@agiliq.com writes:
Eg: See this:
http://nbviewer.ipython.org/5151306
I was expecting datetime.date.today() == datetime.datetime.today()
to give me a True. (It is false).
I'd expect it to be False. There will be a small amount of time between
the two invocations and the
I'd expect it to be False. There will be a small amount of time between
the two invocations and the time will change
Ok, that makes sense. Should have written a better test case. What about
this.
datetime.datetime(2013, 1, 1) == datetime.date(2013, 1, 1)
False
datetime.datetime.today() ==