New submission from Christian Taylor <di...@chello.at>: I've been playing around with the newly released Python 3.0, and I'm a bit confused about the built-in round()-function. To sum it up in a single example:
Python 3.0 (r30:67503, Dec 7 2008, 04:54:04) [GCC 4.3.2] on linux2 >>> round(25, -1) 30.0 I had expected the result to be the integer 20, because: 1. The documentation on built-in functions says: "values are rounded to the closest multiple of 10 to the power minus n; if two multiples are equally close, rounding is done toward the even choice" 2. Both help(round) and the documentation on built-in functions claim that, if two arguments are given, the return value will be of the same type as the first argument. Is this unintended behaviour, or am I missing something? ---------- components: Interpreter Core messages: 78113 nosy: dingo severity: normal status: open title: round() shows undocumented behaviour type: behavior versions: Python 3.0 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4707> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com