[issue39335] round Decimal edge case

2020-01-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Python 2, round just converts the decimal to a float. So, this is a consequence of: >>> float(Decimal('-123.49')) -123.5 -- nosy: +benjamin.peterson resolution: -> not a bug stage: -> resolved status: o

[issue39335] round Decimal edge case

2020-01-14 Thread Hrvoje Abraham
New submission from Hrvoje Abraham : >>> from decimal import Decimal >>> round(Decimal('-123.49')) -124.0 I would expect -123.0, even considering Py2 rounding convention details (away from zero), Decimal rounding convention (default rounding=ROUND_HALF_E