Files
deb-python-lesscpy/lesscpy/test/testutility.py
Sascha Peilicke 7a65e81fa7 Add utility function convergent_round
Mimics Python3's changed rounding behavior: "The round() function
rounding strategy and return type have changed. Exact halfway cases are
now rounded to the nearest even result instead of away from zero. (For
example, round(2.5) now returns 2 rather than 3.) round(x[, n]) now
delegates to x.__round__([n]) instead of always returning a float. It
generally returns an integer when called with a single argument and a
value of the same type as x when called with two arguments."
2013-08-08 18:25:23 +02:00

3.9 KiB