mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
SF bug #1035279: hex() and oct() documentation is incorrect
* Updated docs to reflected signed return values. * Fixed a doubled word typo.
This commit is contained in:
parent
fec0c466ad
commit
f751fa6195
1 changed files with 5 additions and 13 deletions
|
@ -506,12 +506,8 @@ class C:
|
||||||
|
|
||||||
\begin{funcdesc}{hex}{x}
|
\begin{funcdesc}{hex}{x}
|
||||||
Convert an integer number (of any size) to a hexadecimal string.
|
Convert an integer number (of any size) to a hexadecimal string.
|
||||||
The result is a valid Python expression. Note: this always yields
|
The result is a valid Python expression.
|
||||||
an unsigned literal. For example, on a 32-bit machine,
|
\versionchanged[Formerly only returned an unsigned literal.]{2.4}
|
||||||
\code{hex(-1)} yields \code{'0xffffffff'}. When evaluated on a
|
|
||||||
machine with the same word size, this literal is evaluated as -1; at
|
|
||||||
a different word size, it may turn up as a large positive number or
|
|
||||||
raise an \exception{OverflowError} exception.
|
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{id}{object}
|
\begin{funcdesc}{id}{object}
|
||||||
|
@ -670,12 +666,8 @@ class C:
|
||||||
|
|
||||||
\begin{funcdesc}{oct}{x}
|
\begin{funcdesc}{oct}{x}
|
||||||
Convert an integer number (of any size) to an octal string. The
|
Convert an integer number (of any size) to an octal string. The
|
||||||
result is a valid Python expression. Note: this always yields an
|
result is a valid Python expression.
|
||||||
unsigned literal. For example, on a 32-bit machine, \code{oct(-1)}
|
\versionchanged[Formerly only returned an unsigned literal.]{2.4}
|
||||||
yields \code{'037777777777'}. When evaluated on a machine with the
|
|
||||||
same word size, this literal is evaluated as -1; at a different word
|
|
||||||
size, it may turn up as a large positive number or raise an
|
|
||||||
\exception{OverflowError} exception.
|
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{open}{filename\optional{, mode\optional{, bufsize}}}
|
\begin{funcdesc}{open}{filename\optional{, mode\optional{, bufsize}}}
|
||||||
|
@ -1111,7 +1103,7 @@ It's a function
|
||||||
Implementations may impose restrictions to achieve this.
|
Implementations may impose restrictions to achieve this.
|
||||||
The C implementation of Python restricts all arguments to
|
The C implementation of Python restricts all arguments to
|
||||||
native C longs ("short" Python integers), and also requires
|
native C longs ("short" Python integers), and also requires
|
||||||
that that number of elements fit in a native C long.}
|
that the number of elements fit in a native C long.}
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{zip}{\optional{seq1, \moreargs}}
|
\begin{funcdesc}{zip}{\optional{seq1, \moreargs}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue