This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cegner
Recipients cegner, rhettinger
Date 2009-08-19.23:53:29
SpamBayes Score 6.205596e-08
Marked as misclassified No
Message-id <1250726012.7.0.954501370979.issue6737@psf.upfronthosting.co.za>
In-reply-to
Content
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!
History
Date User Action Args
2009-08-19 23:53:32cegnersetrecipients: + cegner, rhettinger
2009-08-19 23:53:32cegnersetmessageid: <1250726012.7.0.954501370979.issue6737@psf.upfronthosting.co.za>
2009-08-19 23:53:30cegnerlinkissue6737 messages
2009-08-19 23:53:29cegnercreate