New submission from JD-Veiga <jdve...@gmail.com>: Hi,
I would like to propose a minor addition to `decimal` package documentation page (https://docs.python.org/3/library/decimal.html). I think that we should add a paragraph in `context.power(x, y, modulo=None)` stating that `Decimal(0) ** Decimal(0)` returns `Decimal('NaN')` instead of `1` --as `0 ** 0` does-- or `1.0` --in case of `0.0 ** 0.0`. Indeed, `0 ** 0` is `NaN` is mentioned as example of operations raising `InvalidOperation` exceptions. However, I think that this is not enough to indicate the different behaviour of decimal versus int and float numbers. Moreover, in the case of `%` and `//` operators, there are clear remarks on these differences (See: “There are some small differences between arithmetic on Decimal objects and arithmetic on integers and floats [...]” in the page). Thank you and sorry for the inconvenience. ---------- assignee: docs@python components: Documentation messages: 372969 nosy: JD-Veiga, docs@python priority: normal severity: normal status: open title: Documentation Decimal power 0 to the 0 is Nan (versus 0 to the 0 which is 1) type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41205> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com