Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5cd75202
Commit
5cd75202
authored
Jan 14, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Describe new ("unsigned") behavior of hex() and oct().
parent
9a0313cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
Doc/lib/libfuncs.tex
Doc/lib/libfuncs.tex
+12
-2
Doc/libfuncs.tex
Doc/libfuncs.tex
+12
-2
No files found.
Doc/lib/libfuncs.tex
View file @
5cd75202
...
...
@@ -189,7 +189,12 @@ module from which it is called).
\begin{funcdesc}
{
hex
}{
x
}
Convert an integer number (of any size) to a hexadecimal string.
The result is a valid Python expression.
The result is a valid Python expression. Note: this always yields
an unsigned literal, e.g. on a 32-bit machine,
\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
\code
{
OverflowError
}
exception.
\end{funcdesc}
\begin{funcdesc}
{
id
}{
object
}
...
...
@@ -256,7 +261,12 @@ any kind of sequence; the result is always a list.
\begin{funcdesc}
{
oct
}{
x
}
Convert an integer number (of any size) to an octal string. The
result is a valid Python expression.
result is a valid Python expression. Note: this always yields
an unsigned literal, e.g. on a 32-bit machine,
\code
{
oct(-1)
}
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
\code
{
OverflowError
}
exception.
\end{funcdesc}
\begin{funcdesc}
{
open
}{
filename
\optional
{
\,
mode
\optional
{
\,
bufsize
}}}
...
...
Doc/libfuncs.tex
View file @
5cd75202
...
...
@@ -189,7 +189,12 @@ module from which it is called).
\begin{funcdesc}
{
hex
}{
x
}
Convert an integer number (of any size) to a hexadecimal string.
The result is a valid Python expression.
The result is a valid Python expression. Note: this always yields
an unsigned literal, e.g. on a 32-bit machine,
\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
\code
{
OverflowError
}
exception.
\end{funcdesc}
\begin{funcdesc}
{
id
}{
object
}
...
...
@@ -256,7 +261,12 @@ any kind of sequence; the result is always a list.
\begin{funcdesc}
{
oct
}{
x
}
Convert an integer number (of any size) to an octal string. The
result is a valid Python expression.
result is a valid Python expression. Note: this always yields
an unsigned literal, e.g. on a 32-bit machine,
\code
{
oct(-1)
}
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
\code
{
OverflowError
}
exception.
\end{funcdesc}
\begin{funcdesc}
{
open
}{
filename
\optional
{
\,
mode
\optional
{
\,
bufsize
}}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment