[Python-ideas] Augmented assignment syntax for objects.

Mike Miller python-ideas at mgmiller.net
Wed Apr 26 18:57:44 EDT 2017


Yes, I like it too.  Removes the triple repetition, and has precedent in the 
other languages.


On 2017-04-26 12:54, Jerry Hill wrote:
> On Tue, Apr 25, 2017 at 8:05 PM, Ryan Gonzalez <rymg19 at gmail.com> wrote:
>> def ___init__(self, self.attr):
>
> I'm not a python developer, I'm just a developer that uses python.
> That said, I really like this form.  It eliminates most of the
> redundancy, while still being explicit.  It's true that you have to
> repeat the 'self' name, but it feels like the right balance in my
> mind.


More information about the Python-ideas mailing list