Christopher Egner <ceg...@yahoo-inc.com> added the comment:

I was running the odict.py file from the PEP, figured out that things
were going off the rails at dict.__eq__ and generalised, saw the same
implementation in OrderedDict, I thought the same problem would exist. 
This is what I get for taking a shortcut.

I checked out the activestate recipe mentioned in msg91755 which works.

The odict.py version, here is a literal paste from the pdb prompt (aside
from changing some of the more private data to xxx):
(Pdb) p urlConsolidationArtefact_row_prev
odict.odict([(u'id', 58768L), (u'urlConsolidationRun_id', 22L),
(u'valid', True), (u'validated', False), (u'refererUrl',
u'http://search.yahoo.com/search?y=xxx'), (u'refererUrl_hash',
'\xa60\xe2\xb8D\x7fv\x03\xb1=\xf3{\x15\xc0\xb0)'), (u'url',
u'http://xxx'), (u'url_hash',
'\x00\x00\xc8\xf3\xa3\x0f\x1d\xc2wn\xb4\xc7\xd7\xe1\xca3'),
(u'updatedAt', datetime.datetime(2009, 8, 15, 10, 54, 15)),
(u'createdAt', datetime.datetime(2009, 8, 15, 10, 54, 14))])
(Pdb) p urlConsolidationArtefact_row_prev != None
False
(Pdb) p urlConsolidationArtefact_row_prev == None
False

So there is a problem at least in the odict module provided by 
http://dev.pocoo.org/hg/sandbox/raw-file/tip/odict.py (referenced in the
PEP, once more prominently than now, I think).

Anyhow, I don't really know the details of what python does with
NotImplemented but version you gave doesn't have the same problem, so
I'll gladly use that instead.

If you can confirm that there's no deeper issue here, I'll be glad to
close the bug.

Thanks for the help!

----------
versions:  -Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6737>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to