On Feb 21, 2005, at 9:17 PM, Bob Ippolito wrote:

On Feb 21, 2005, at 9:12 PM, Kevin Ollivier wrote:

On Feb 21, 2005, at 4:49 PM, Charles Hartman wrote:

This may be the wrong list for this question. Send me away if so, but I thought I'd try here first.

I'm building Mac and Windows versions of an application with a dictionary as one main data structure. A dialog box lets the user type a string which is then used to change the value associated with one of the keys, or to generate a new key-value pair. At least if the pair is new, on Windows the test
if word in self.Dict:
newvalue = self.Dict[word]

Out of curiosity, have you tried the has_key() dictionary method, like "if self.Dict.has_key(word):"?

I wouldn't go down that road, I'm pretty confident that this isn't a bug in Python :)


-bob


-- but I'll check it anyway for my own peace of mind.

Charles Hartman

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to