Dictionary membership check failure

Z

Zac Burns

Greetings,

I have a dictionary that seems to be misbehaving on a membership
check. This test code:

1: import types
2: assert myDict.__class__ is types.DictionaryType
3: assert (key in myDict.keys()) == (key in myDict)

raises AssertionError on line three. The dictionary items are all of
type (string, function).

There are no threads.

Python version is 2.5.1, I cannot go to 2.5.2 right now because of a
module that we use that depends on 2.5.1 (maya standalone), but does
anyone know if this bug has been fixed in 2.5.2 or if I can give
anyone more information to help fix this bug?
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top