Fast Dictionary Access

Paul Rubin http
Sat Jun 27 08:59:39 EDT 2009


Duncan Booth <duncan.booth at invalid.invalid> writes:
> The suggested alternative:
> 
>    value = data.get(key, None) 
> 
> also has two dictionary lookups:...

dg = data.get
...
(inside loop):
   value = dg(key,None)



More information about the Python-list mailing list