simple math question

John Salerno johnjsal at NOSPAMgmail.com
Sat Feb 11 14:52:10 EST 2006


Hi all. I'm just starting out with Python, so I'm a little slow right 
now. :)

Can someone explain to me why the expression 5 / -2 evaluates to -3, 
especially considering that -2 * -3 evaluates to 6?

I'm sure it has something to do with the negative number and the current 
way that the / operator is implemented, but why doesn't it evaluate to 
-2 instead?



More information about the Python-list mailing list