Dec_0 and friends from Python Decimal
This fails in
from decimal import Dec_0
But it works in all the other
It seems that exposing
Dec_0 (and other similar constants) was considered a bug and "fixed" on Jan 3rd 2009 by renaming it
Indeed, if I had looked at the source code, I would have seen that
Dec_0 was for "internal use only".
# Reusable defaults Inf = Decimal('Inf') negInf = Decimal('-Inf') NaN = Decimal('NaN') Dec_0 = Decimal(0) Dec_p1 = Decimal(1) Dec_n1 = Decimal(-1)
Those definitions are missing in
py2.5.1, and renamed in
Damn: never use undocumented features!