Way for see if dict has a key

Fredrik Lundh fredrik at pythonware.com
Fri Jun 30 12:18:45 EDT 2006


Bruno Desthuilliers wrote:

> Seems that if "key in dict" do a simple linear search

that would be rather silly.

hint: http://pyref.infogami.com/__contains__

</F>




More information about the Python-list mailing list