By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,125 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

mx.DateTime bug?

P: n/a

DateTime objects always compare equal to instances of
user-defined classes:

Python 2.3.2 (#1, Nov 27 2003, 18:07:14)
[GCC 3.2] on linux2
Type "help", "copyright", "credits" or "license" for more
from mx import DateTime
DateTime.__version__ '2.0.3' class c: pass ....


Documentations states that "DateTime and DateTimeDelta instances
can be compared and hashed, making them compatible to the
dictionary implementation Python uses (they can be used as
keys)", but there is at least race condition when instance of
user defined class has the same hash value. Moreover, making
DateTime objects to be always equal to instances with unknown
nature is a bad idea.

Denis S. Otkidach [ru]
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.