Bug in __imul__
Erik Max Francis
max at alcyone.com
Wed Jul 11 11:20:51 EDT 2001
Emile van Sebille wrote:
> Does it bother anyone that
>
> a *= 3 + 4
>
> returns a different value from
>
> a = a * 3 + 4
No, because they're not the same thing. Operator precedence means that
a * 3 + 4 is the same as (a * 3) + 4, not a * (3 + 4).
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Society attacks early when the individual is helpless.
\__/ B.F. Skinner
REALpolitik / http://www.realpolitik.com/
Get your own customized newsfeed online in realtime ... for free!
More information about the Python-list
mailing list