AtrributeDict

Chris Rebert clp2 at rebertia.com
Wed Apr 29 20:34:09 EDT 2009


2009/4/29 Дамјан Георгиевски <gdamjan at gmail.com>:
> I've needed an attribute accessible dict, so I created this.
> Are there any obviously stupid shortcomings?

If you know the attribute names ahead of time, you might consider
using a namedtuple instead.
See http://docs.python.org/library/collections.html#collections.namedtuple

Cheers,
chris
-- 
http://blog.rebertia.com



More information about the Python-list mailing list