Arne Babenhauserheide <arne_...@web.de> added the comment: I did not know about rounding to even, so maybe there should be a warning in the 2.7 documentation, that the behavior changed in python 3 (I just checked that: python2.7 is in line with the documentation).
The first time I stumbled over these issues was when implementing a game, where I wanted to map pixels to hexfields, where I had to get the borderline cases right: https://bitbucket.org/ArneBab/hexbattle/src/38ad49c04836/hexgrid.py#cl-24 This likely won’t hit me in the game, but it really hurts in the doctests. PS: I like the naming as “allow other rounding modes”, so I changed the title of the bug. I hope that’s OK. PPS: Thank you for all your replies! The bugtracker feels really welcoming and helpful, even when reporting something as a bug, which is just a difference in goal definition. I hope it will turn out to be useful for the community! ---------- title: make round() floating-point errors less hurtful -> allow other rounding modes in round() _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13060> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com