[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

Jack Diederich report at bugs.python.org
Thu Mar 26 17:51:11 CET 2009


Jack Diederich <jackdied at gmail.com> added the comment:

+1

Patch and tests work for me.  Uploaded a patch that is identical except
the file paths are fixed.

Was the old behavior stable across compilers anyway?  It memcmpared two
different structs and IIRC only the first item of each struct is
guaranteed to be at the start of the memory location.  No?

With this patch only same-struct objects are memcmpared.

----------
nosy: +jackdied
Added file: http://bugs.python.org/file13419/issue5516_trunk.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5516>
_______________________________________


More information about the Python-bugs-list mailing list