Дамјан Георгиевски gdamjan at
Thu Apr 30 01:09:48 CEST 2009

I've needed an attribute accessible dict, so I created this.
Are there any obviously stupid shortcomings?

class AttrDict(dict):
   def __getattr__(self, name):
           return self[name]
       except KeyError, e:
           raise AttributeError(e)

дамјан ( )

Our national drug is alcohol,
we tend to regard the use any other drug with special horror.
    -- William S. Burroughs

More information about the Python-list mailing list