[Python-Dev] Order of operations

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Aug 31 05:17:36 CEST 2007

Jason Orendorff wrote:
> I think the weirdness comes from parsing -a/b as (-a)/b rather than
> -(a/b).

This will sort of be fixed in 3.0, at least for /, because
it will always mean float division, for which -(a/b) == (-a)/b.

You'll have to use // to get weirdness, then. :-)

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiem!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list