Fredrik Lundh wrote: > > > It's come up before. The problem with it is that it's not quite obvious > > whether it is 'if key in dict' or 'if value in dict'. > > you forgot "if (key, value) in dict" > > on the other hand, it's not quite obvious that "list.sort" > doesn't return the sorted list, "print >>None" prints to > standard output, "except KeyError, ValueError" doesn't > catch a ValueError exception, etc, etc, etc. > > (nor that it's "has_key" and "hasattr", and not "has_key" > and "has_attr" or "haskey" and "hasattr" ;-) > > let's just say that "in" is the same thing as "has_key", > and be done with it. +1 all the way :) -- Marc-Andre Lemburg ______________________________________________________________________ Company: http://www.egenix.com/ Consulting: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4