mirror of https://github.com/python/cpython.git
SF bug # 1457358 and patch # 1458419, floor division not documented. Patch by Andy.
Will backport.
This commit is contained in:
parent
4ec3c26952
commit
6a91e94e66
|
@ -249,6 +249,7 @@ comparison operations):
|
||||||
\hline
|
\hline
|
||||||
\lineiii{\var{x} * \var{y}}{product of \var{x} and \var{y}}{}
|
\lineiii{\var{x} * \var{y}}{product of \var{x} and \var{y}}{}
|
||||||
\lineiii{\var{x} / \var{y}}{quotient of \var{x} and \var{y}}{(1)}
|
\lineiii{\var{x} / \var{y}}{quotient of \var{x} and \var{y}}{(1)}
|
||||||
|
\lineiii{\var{x} // \var{y}}{(floored) quotient of \var{x} and \var{y}}{(5)}
|
||||||
\lineiii{\var{x} \%{} \var{y}}{remainder of \code{\var{x} / \var{y}}}{(4)}
|
\lineiii{\var{x} \%{} \var{y}}{remainder of \code{\var{x} / \var{y}}}{(4)}
|
||||||
\hline
|
\hline
|
||||||
\lineiii{-\var{x}}{\var{x} negated}{}
|
\lineiii{-\var{x}}{\var{x} negated}{}
|
||||||
|
@ -299,6 +300,9 @@ Complex floor division operator, modulo operator, and \function{divmod()}.
|
||||||
\deprecated{2.3}{Instead convert to float using \function{abs()}
|
\deprecated{2.3}{Instead convert to float using \function{abs()}
|
||||||
if appropriate.}
|
if appropriate.}
|
||||||
|
|
||||||
|
\item[(5)]
|
||||||
|
Also referred to as integer division. The resultant value is a whole integer,
|
||||||
|
though the result's type is not necessarily int.
|
||||||
\end{description}
|
\end{description}
|
||||||
% XXXJH exceptions: overflow (when? what operations?) zerodivision
|
% XXXJH exceptions: overflow (when? what operations?) zerodivision
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue