diff Doc/lib/liboperator.tex @ 24887:d797cfa8ca0d legacy-trunk

Added __pow__(a,b) to the operator module. Completes the pattern of all operators having a counterpart in the operator module. Closes SF bug #577513.
author Raymond Hettinger <python@rcn.com>
date Mon, 19 Aug 2002 03:19:09 +0000
parents 376ee174ecd0
children 641786bea13e
line wrap: on
line diff
--- a/Doc/lib/liboperator.tex	Mon Aug 19 00:42:29 2002 +0000
+++ b/Doc/lib/liboperator.tex	Mon Aug 19 03:19:09 2002 +0000
@@ -131,6 +131,11 @@
 Return \var{o} positive.
 \end{funcdesc}
 
+\begin{funcdesc}{pow}{a, b}
+\funcline{__pow__}{a, b}
+Return \var{a} \code{**} \var{b}, for \var{a} and \var{b} numbers.
+\end{funcdesc}
+
 \begin{funcdesc}{rshift}{a, b}
 \funcline{__rshift__}{a, b}
 Return \var{a} shifted right by \var{b}.
@@ -310,6 +315,8 @@
           {\code{invert(\var{a})}}
   \lineiii{Bitwise Or}{\code{\var{a} | \var{b}}}
           {\code{or_(\var{a}, \var{b})}}
+  \lineiii{Exponentiation}{\code{\var{a} ** \var{b}}}
+          {\code{pow(\var{a}, \var{b})}}
   \lineiii{Indexed Assignment}{\code{\var{o}[\var{k}] = \var{v}}}
           {\code{setitem(\var{o}, \var{k}, \var{v})}}
   \lineiii{Indexed Deletion}{\code{del \var{o}[\var{k}]}}