accessing dictionary keys

Rami Chowdhury rami.chowdhury at gmail.com
Thu Oct 1 16:35:16 EDT 2009


On Thu, 01 Oct 2009 13:19:18 -0700, Andreas Balogh <baloand at gmail.com>  
wrote:

>
> Is there any shortcut which allows to use point.x with a dictionary, or  
> defining keys with tuples and lists?
>
> Regards, Andreas
>

It sounds like you want collections.namedtuple (Python 2.6 and up; recipe  
for Python 2.4 or 2.5 at http://code.activestate.com/recipes/500261/)?

HTH,
Rami

-- 
Rami Chowdhury
"Never attribute to malice that which can be attributed to stupidity" --  
Hanlon's Razor
408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD)



More information about the Python-list mailing list