Ben Wilson <[EMAIL PROTECTED]> wrote:

> Perhaps:
> 
> def dictionary_make_attributes(self, settings):
>      for k,v in settings:
>          setattr(self, k, v)

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
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to