On 04 Nov 2005 17:53:34 -0800, Paul Rubin <http://[EMAIL PROTECTED]> wrote:

>[EMAIL PROTECTED] (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.

Well, if you accepted macro semantics IWT you _would_ want to ;-)

Hm, reminds me of typical adding of parens in macros to control precedence
in expressions ... so I tried
 >>> a = [0]
 >>> (a[0]) += 1
 SyntaxError: augmented assign to tuple literal or generator expression not 
possible

;-/

Regards,
Bengt Richter
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to