[Python-checkins] r43182 - python/trunk/Doc/lib/libfuncs.tex
georg.brandl
python-checkins at python.org
Tue Mar 21 09:48:05 CET 2006
Author: georg.brandl
Date: Tue Mar 21 09:48:04 2006
New Revision: 43182
Modified:
python/trunk/Doc/lib/libfuncs.tex
Log:
Add a note about pow(x,y) equalling x**y (the "**" operator
was used unmotivated in the pow() docs)
Modified: python/trunk/Doc/lib/libfuncs.tex
==============================================================================
--- python/trunk/Doc/lib/libfuncs.tex (original)
+++ python/trunk/Doc/lib/libfuncs.tex Tue Mar 21 09:48:04 2006
@@ -735,8 +735,11 @@
\begin{funcdesc}{pow}{x, y\optional{, z}}
Return \var{x} to the power \var{y}; if \var{z} is present, return
\var{x} to the power \var{y}, modulo \var{z} (computed more
- efficiently than \code{pow(\var{x}, \var{y}) \%\ \var{z}}). The
- arguments must have numeric types. With mixed operand types, the
+ efficiently than \code{pow(\var{x}, \var{y}) \%\ \var{z}}).
+ The two-argument form \code{pow(\var{x}, \var{y})} is equivalent to using
+ the power operator: \code{\var{x}**\var{y}}.
+
+ The arguments must have numeric types. With mixed operand types, the
coercion rules for binary arithmetic operators apply. For int and
long int operands, the result has the same type as the operands
(after coercion) unless the second argument is negative; in that
More information about the Python-checkins
mailing list