This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients Francis.Nimick, docs@python, eric.smith, mark.dickinson, r.david.murray, terry.reedy
Date 2013-02-22.20:02:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361563362.94.0.330362417682.issue17259@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-02-22 20:02:42mark.dickinsonsetrecipients: + mark.dickinson, terry.reedy, eric.smith, r.david.murray, docs@python, Francis.Nimick
2013-02-22 20:02:42mark.dickinsonsetmessageid: <1361563362.94.0.330362417682.issue17259@psf.upfronthosting.co.za>
2013-02-22 20:02:42mark.dickinsonlinkissue17259 messages
2013-02-22 20:02:42mark.dickinsoncreate