In Python 3.5, I'm seeing the following rounding behavior:
>>> round(7.55, 1)
7.5 # expected to round up to 7.6
>>> round(7.45, 1)
7.5 # this is fine
Maybe my intuition is incorrect, but I expect the hundreths of 5
in 7.55
to round upwards to 7.6
. The standard Python 3 behavior is not what matches my data's expectation; I clearly need something beyond the standard round
method to achieve this goal. Is there a way to get this behavior?