]> granicus.if.org Git - python/commitdiff
#1501: document that 0**0 == 1.
authorGeorg Brandl <georg@python.org>
Sun, 6 Jan 2008 15:41:50 +0000 (15:41 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 6 Jan 2008 15:41:50 +0000 (15:41 +0000)
Doc/library/stdtypes.rst

index d7e7d498d3edcdb9fe4098dfa1c23105a5edaf38..5d7698f1e5fbfa3054e059df193879fae3e47e08 100644 (file)
@@ -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: