Fast Dictionary Access

Paul Rubin http
Sat Jun 27 14:59:39 CEST 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