
-----Original Message----- From: Python-ideas [mailto:python-ideas-bounces+tritium- list=sdamon.com@python.org] On Behalf Of Oleg Broytman Sent: Wednesday, April 26, 2017 7:33 AM To: python-ideas@python.org Subject: Re: [Python-ideas] Augmented assignment syntax for objects.
On Wed, Apr 26, 2017 at 01:12:14PM +0200, Brice PARENT <contact@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.
Oleg. -- Oleg Broytman http://phdru.name/ phd@phdru.name Programmers don't die, they just GOSUB without 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/