On Jul 21, 7:48 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > "Rustom Mody" <[EMAIL PROTECTED]> wrote: > > Can someone who knows about python internals throw some light on why > >>>> x in dic > > is cheaper than > >>>> dic.has_key(x) > > > ?? >
>From the 2.6 PEP #361 (looks like dict.has_key is deprecated) Python 3.0 compatability: ['compatibility'-->someone should use a spell-checker for 'official' releases] - warnings were added for the following builtins which no longer exist in 3.0: apply, callable, coerce, dict.has_key, execfile, reduce, reload -- http://mail.python.org/mailman/listinfo/python-list