summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-06 15:41:50 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-06 15:41:50 (GMT)
commitdb210dfba28524935a61959c2edf96496d33bf19 (patch)
treeb2da415dcee7b2ca3dcf0d17e655551b18851182
parenta8cbad3b834a60abc211dfcc76ad0612c834b931 (diff)
downloadcpython-db210dfba28524935a61959c2edf96496d33bf19.zip
cpython-db210dfba28524935a61959c2edf96496d33bf19.tar.gz
cpython-db210dfba28524935a61959c2edf96496d33bf19.tar.bz2
#1501: document that 0**0 == 1.
-rw-r--r--Doc/library/stdtypes.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index d7e7d49..5d7698f 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -311,9 +311,9 @@ All builtin numeric types support the following operations. See
+--------------------+---------------------------------+--------+
| ``divmod(x, y)`` | the pair ``(x // y, x % y)`` | (3)(4) |
+--------------------+---------------------------------+--------+
-| ``pow(x, y)`` | *x* to the power *y* | \(3) |
+| ``pow(x, y)`` | *x* to the power *y* | (3)(7) |
+--------------------+---------------------------------+--------+
-| ``x ** y`` | *x* to the power *y* | |
+| ``x ** y`` | *x* to the power *y* | \(7) |
+--------------------+---------------------------------+--------+
.. index::
@@ -366,6 +366,10 @@ Notes:
.. versionadded:: 2.6
+(7)
+ Python defines ``pow(0, 0)`` and ``0 ** 0`` to be ``1``, as is common for
+ programming languages.
+
All :class:`numbers.Real` types (:class:`int`, :class:`long`, and
:class:`float`) also include the following operations: