sort a dictionary by keys in specific order

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Fri May 26 19:00:48 EDT 2006


Tim Chase a écrit :
(snip)
 >
>> list = [key2, key3, key1] 
> 
> 1)  it's bad practice to shadow the list() command...

s/command/type/

> funky stuff can happen.

indeed, if you shadow it with a non-compatible object !-)




More information about the Python-list mailing list