On Wed, Apr 26, 2017 at 2:02 PM, <tritium-l...@sdamon.com> wrote: >> On Wed, Apr 26, 2017 at 01:12:14PM +0200, Brice PARENT >> <cont...@brice.xyz> wrote: >> > def _set_multiple(self, **kwargs): >> > for key, value in kwargs.items(): >> > setattr(self, key, value) >> >> self.__dict__.update(kwargs) > > Touching __dict__ feels dirty to me.
vars(self).update(kwargs)? ㎝ -- |:**THE 🍺-WARE LICENSE** *(Revision ㊷)*: | <miron@🐍.it> wrote this mail. As long as you retain this | notice you can do whatever you want with this stuff. | If we meet some day, and you think this stuff is worth it, | you can buy me a 🍺 in return. —㎝ _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/