[issue7754] decimal.Decimal 0.0**0.0 error

2010-01-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the feedback, Raymond. I'll close this, then. -- status: open -> closed ___ Python tracker ___ _

[issue7754] decimal.Decimal 0.0**0.0 error

2010-01-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would not be happy with unlinking __pow__ from the standard's power operation. We wouldn't be doing our users a favor by implementing part of the standard, then tucking it away in a unexpected place, and substituting our own notion of what should be don

[issue7754] decimal.Decimal 0.0**0.0 error

2010-01-22 Thread Mark Dickinson
Mark Dickinson added the comment: Now that I think about it, this could be 'fixed' without breaking compliance: all the specification requires is that a power function with the specified behaviour is present *somewhere* in the decimal module; it needn't be linked to the ** operator. So the

[issue7754] decimal.Decimal 0.0**0.0 error

2010-01-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report. Unfortunately, this behaviour is by design: the decimal module follows the specification at http://speleotrove.com/decimal/decarith.html See particularly: http://speleotrove.com/decimal/daops.html#refpower Yes, I think this is wron

[issue7754] decimal.Decimal 0.0**0.0 error

2010-01-21 Thread R. David Murray
Changes by R. David Murray : -- components: +Library (Lib) nosy: +mark.dickinson priority: -> normal type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker _

[issue7754] decimal.Decimal 0.0**0.0 error

2010-01-21 Thread Mike Clark
New submission from Mike Clark : Good behavior: >>> 0.0**0.0 1.0 >>> Bad behavior: >>> Decimal('0.0')**Decimal('0.0') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/decimal.py", line 2101, in __pow__ return context._raise_error(InvalidOperation, '0 ** 0'