Alex Martelli wrote: > Ben Wilson <[EMAIL PROTECTED]> wrote: > >> Perhaps: >> >> def dictionary_make_attributes(self, settings): >> for k,v in settings: >> setattr(self, k, v)
for k,v in settings.items() > This is a very general solution and will work for all kinds of objects > with settable attributes, even if some of the attributes are properties, > slots or weirder descriptors yet. > > For plain vanilla class instances, though, > self.__dict__.update(settings) > may be sufficient. > > Alex this is the construct I was looking for. see it active: http://pudge.lesscode.org/trac/changeset/118 http://pudge.lesscode.org/trac/ticket/16 . -- http://lazaridis.com -- http://mail.python.org/mailman/listinfo/python-list