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 MJH, ezio.melotti, jab, jyasskin, mark.dickinson, serhiy.storchaka, vstinner
Date 2018-09-26.11:46:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537962400.73.0.545547206417.issue32956@psf.upfronthosting.co.za>
In-reply-to
Content
@jab: Did you see this message from the thread that Serhiy pointed to? https://mail.python.org/pipermail/python-dev/2008-January/075910.html

Here's the sound bite version, but see the message for context:

[Guido]
> Wow. Do you have an opinion as to whether we should adopt
> round-to-even at all (as a default)?

[Tim]
Yes:  yes :-)  [...]

Note that Python is not alone here: .NET also uses round-ties-to-even as the default rounding mode. Note also that the languages you mention don't all agree with one another either: try rounding -2.5 to the nearest integer in JavaScript and see what result you get.

[Joshua]
> and whether it would therefore be better exposed as an additional function (e.g. "round_to_even" or "round_unbiased"

Changing the default behaviour of `round` again seems highly undesirable to me; I'd be strongly opposed to such a change. Proposals for backwards-compatible changes that make the round-ties-away-from-zero function available again under a different name (or via a keyword argument to `round`) could be worth discussing. And suggestions/PRs for documentation clarification are welcome, of course.
History
Date User Action Args
2018-09-26 11:46:40mark.dickinsonsetrecipients: + mark.dickinson, vstinner, jyasskin, ezio.melotti, jab, serhiy.storchaka, MJH
2018-09-26 11:46:40mark.dickinsonsetmessageid: <1537962400.73.0.545547206417.issue32956@psf.upfronthosting.co.za>
2018-09-26 11:46:40mark.dickinsonlinkissue32956 messages
2018-09-26 11:46:40mark.dickinsoncreate