[Python-ideas] Add .= as a method return value assignment operator

Chris Angelico rosuav at gmail.com
Fri Sep 28 05:05:12 EDT 2018


On Fri, Sep 28, 2018 at 6:56 PM Jonathan Fine <jfine2358 at gmail.com> wrote:
> Finally, I note
>
> >>> a = 2
> >>> a **= 3
> >>> a
> 8
>

? Yes? That's what 2 ** 3 is, so that's what I would expect.

All other augmented assignment operators take an assignment target on
the left and a (single) value on the right.

ChrisA


More information about the Python-ideas mailing list