mx.DateTime bug?

D

Denis S. Otkidach

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
information.True

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,040
Members
47,634
Latest member
RonnyBoelk

Latest Threads

Top