[Python-checkins] r59774 - python/trunk/Doc/library/stdtypes.rst
georg.brandl
python-checkins at python.org
Sun Jan 6 16:41:50 CET 2008
Author: georg.brandl
Date: Sun Jan 6 16:41:50 2008
New Revision: 59774
Modified:
python/trunk/Doc/library/stdtypes.rst
Log:
#1501: document that 0**0 == 1.
Modified: python/trunk/Doc/library/stdtypes.rst
==============================================================================
--- python/trunk/Doc/library/stdtypes.rst (original)
+++ python/trunk/Doc/library/stdtypes.rst Sun Jan 6 16:41:50 2008
@@ -311,9 +311,9 @@
+--------------------+---------------------------------+--------+
| ``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 @@
.. 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:
More information about the Python-checkins
mailing list