By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,595 Members | 1,443 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,595 IT Pros & Developers. It's quick & easy.

Re: Dictionary membership check failure

P: n/a
Zac Burns wrote:
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
[...]

For the record, it would be much simpler and more readable to say

assert type(myDict) is dict

not to mention it avoids the unnecessary import.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Nov 5 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.