Mark Dickinson added the comment:

Indeed, in Python 3, round and new-style string formatting both do 
round-ties-to-even, by design.  Old-style formatting does whatever the 
underlying OS does, which is typically round-half-away-from-zero.

Python 2 is a bit more of a mess:  in 2.7, new-style formatting does 
round-ties-to-even, round does round-half-away-from-zero, and old-style 
formatting continues to do whatever the OS does, just as in Python 3.  And 2.6 
is different again (and much more system dependent).

Agreed that this could be better documented for 'format'.  The documentation 
for the round function is already explicit on this, at least for Python 3.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17259>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to