Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

I see. There is no such thing as a "correct" conversion from real
numbers to integer numbers. Instead, there are various approaches,
called "truncating", "rounding", "flooring", and "ceiling". Python's
default conversion is truncation, and it is consistent in doing so:
int(x) will return the nearest integer between 0 and x.

If you want rounding, use the round builtin.

----------
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3024>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to