Stefan Krah <ste...@bytereef.org> added the comment:

Agreed, and it's even slightly worse with the ROUND_FLOOR special case:

>>> c.rounding = ROUND_FLOOR
>>> +Decimal("-0")
Decimal('-0')
>>> 

That's why there are three slightly different methods for applying the
context:

   1) context.create_decimal() ==> special case for NaN payloads.

   2) context.apply() (private method) ==> no special cases at all.

   3) Decimal.plus() ==> ROUND_FLOOR special case.

----------

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

  • ... JD-Veiga
    • ... Karthikeyan Singaravelan
    • ... Tim Peters
    • ... JD-Veiga
    • ... Mark Dickinson
    • ... Stefan Krah
    • ... Mark Dickinson
    • ... శ్రీనివాస్ రెడ్డి తాటిపర్తి
    • ... Stefan Krah
    • ... miss-islington
    • ... miss-islington
    • ... miss-islington
    • ... miss-islington

Reply via email to