list index()

Carsten Haese carsten at uniqsys.com
Thu Aug 30 21:08:08 CEST 2007


On Thu, 2007-08-30 at 11:45 -0700, zzbbaadd at aol.com wrote:
> > That wish will only come true if you maintain your own fork of Python 3.
> > has_key() will go away, period. It has been made obsolete by "in", which
> > is faster and more concise.
> 
> Is there really some reason  "key" IN dict can be implemented faster
> than dict.has_key("key")???

Yes, see e.g.
http://groups.google.com/group/comp.lang.python/msg/03e9b4276846b9c0

-- 
Carsten Haese
http://informixdb.sourceforge.net





More information about the Python-list mailing list