[Mark Dickinson
-Decimal(0.0) # negative sign mysteriously disappears.
Decimal('0')
[Stefan Krah
Unless the rounding mode is ROUND_FLOOR. :(
getcontext().rounding = ROUND_FLOOR -Decimal(0.0) Decimal('-0')
I may be missing something, but our docs don't appear to be clear about what unary minus means in Python's decimal implementation. Looks like Mike C's intent was that +x act like Decimal(0) + x and -x like Decimal(0) - x Then all the examples "make sense" (given that you think the standards' rules for adding/subtracting signed zeros make sense). Can't win! That -x loses the sign when x is a positive 0 (under most rounding modes) is jarring; but that the results of "-x" and "0-x" may not be the same would also be jarring. Not a fan of signed zeroes :-(