Class Variable Access and Assignment

Paul Rubin http
Fri Nov 4 20:53:34 EST 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