Class Variable Access and Assignment

Paul Rubin http
Sat Nov 5 02:53:34 CET 2005


bokr at oz.net (Bengt Richter) writes:
> Hm, "the" fix? Why wouldn't e.g. treating augassign as shorthand for
> a source transformation (i.e., asstgt <op>= expr becomes by simple
> text substitution asstgt = asstgt <op> expr) be as good a fix? Then
> we could discuss what

Consider "a[f()] += 3".  You don't want to eval f() twice.



More information about the Python-list mailing list