[EMAIL PROTECTED] (Bengt Richter) writes: > 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 ;-)
Another one of those throw-away lines. I'd say that was true only if the macro was poorly written. Unless a macros is intended as a tool to repeatedly evaluate an argument, it should only evaluate it at most once. Of course, if you're using some rock-stupid textual macro system, you really don't have much choice in the matter. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list