]> granicus.if.org Git - python/commitdiff
Add a note about pow(x,y) equalling x**y (the "**" operator
authorGeorg Brandl <georg@python.org>
Tue, 21 Mar 2006 08:48:04 +0000 (08:48 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 21 Mar 2006 08:48:04 +0000 (08:48 +0000)
was used unmotivated in the pow() docs)

Doc/lib/libfuncs.tex

index 9b6bfe9d7b4c5604acc0089245290d977d132ae0..eeed877f945fdb21fb793cf8b98ab1b16c0afb56 100644 (file)
@@ -735,8 +735,11 @@ class C:
 \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