Mark Dickinson <dicki...@gmail.com> 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

<rant> Yes, I think this is wrong too, particularly since (a) it's inconsistent 
with Decimal('Inf')**Decimal('0.0') giving Decimal('1') and (b) it's 
inconsistent with other established standards like IEEE 754-2008 and C99 Annex 
F.  And that's before getting into arguments about how a simple power operation 
is *not* the same thing as an indeterminate form, and how Decimal is also 
supposed to be usable for pure integer arithmetic, where having 0**0 be 
anything other than 1 is horrible.  I made these points to the author of the 
specification some time ago, but he was regrettably unmoved.  :)  </rant>

Ultimately, I don't think it's a big enough issue to justify breaking 
compliance with the specification.

----------
assignee:  -> mark.dickinson
nosy: +skrah
resolution:  -> invalid
status: open -> pending

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7754>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to