[Python-ideas] Reverse assignment operators (=+, =-, =*, =/, =//, =**, =%)
MRAB
python at mrabarnett.plus.com
Mon Nov 14 22:40:12 EST 2016
- Previous message (by thread): [Python-ideas] Reverse assignment operators (=+, =-, =*, =/, =//, =**, =%)
- Next message (by thread): [Python-ideas] Reverse assignment operators (=+, =-, =*, =/, =//, =**, =%)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On 2016-11-15 02:59, Matthias welp wrote:
[snip]
> e.g. if you use 'a = a + 1', python under the hood interprets it as
> 'a = a.__add__(1)', but if you use 'a += 1' it uses 'a.__iadd__(1)'.
FTR, 'a += 1' is interpreted as 'a = a.__iadd__(1)'.
- Previous message (by thread): [Python-ideas] Reverse assignment operators (=+, =-, =*, =/, =//, =**, =%)
- Next message (by thread): [Python-ideas] Reverse assignment operators (=+, =-, =*, =/, =//, =**, =%)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-ideas
mailing list