On 2006-07-28, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > Hmmm, I've not followed the PEPs -- has any thought been given to > unifying class/instance and dictionary notation so that > > a['b'] > and > a.b
If that is what you want, you could use the following class: class Unified(object): def __init__(__, **kwargs): for key,value in kwargs.items(): setattr(__, key, value) def __getitem__(self, key): return getattr(self, key) def __setitem__(self, key, value): setattr(self, key, value) -- http://mail.python.org/mailman/listinfo/python-list