Thanos Tsouanas wrote: > I would like to have a quick way to create dicts from object, so that a > call to foo['bar'] would return obj.bar. > > The following works, but I would prefer to use a built-in way if one > exists. Is there one?
Maybe I'm not understanding your problem, but have you looked at the builtin "vars()"? STeVe -- http://mail.python.org/mailman/listinfo/python-list