Tim Peters <t...@python.org> added the comment:

>> can we use the decimal module's names for the supported
>> rounding modes?

> I'm not sure those make sense because we never get to
> exactly half.  There is only floor, ceil, and round,
> not half_up, half_even, etc.

So use decimal's ROUND_CEILING, ROUND_FLOOR, and ROUND_HALF_EVEN. It's 
irrelevant that the halfway case can't occur: it's still following the 
ROUND_HALF_EVEN rules, it's just that one of those rules never happens to apply 
in this context. So what? Your _intent_ is to supply "best possible rounding", 
and that's what ROUND_HALF_EVEN means. It's not doing any favors to make up a 
new name for a rounding mode that only applies to values that can never tie. 
Tail. dog, wag ;-) If someone knows what half/even does, they already know what 
_this_ rounding mode does. Why complicate it with a useless distinction?

----------

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

Reply via email to