[Python-ideas] Augmented assignment syntax for objects.

Oleg Broytman phd at phdru.name
Wed Apr 26 07:32:31 EDT 2017


On Wed, Apr 26, 2017 at 01:12:14PM +0200, Brice PARENT <contact at brice.xyz> wrote:
>     def _set_multiple(self, **kwargs):
>         for key, value in kwargs.items():
>             setattr(self, key, value)

    self.__dict__.update(kwargs)

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            phd at phdru.name
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-ideas mailing list