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
921f32ce
Commit
921f32ce
authored
Jun 02, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mention abs(complex) -> magnitude (AMK).
Documented list(). Mention [raw_]input()'s interface to GNU readline.
parent
3a0d8501
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
6 deletions
+36
-6
Doc/lib/libfuncs.tex
Doc/lib/libfuncs.tex
+18
-3
Doc/libfuncs.tex
Doc/libfuncs.tex
+18
-3
No files found.
Doc/lib/libfuncs.tex
View file @
921f32ce
...
...
@@ -7,7 +7,8 @@ are always available. They are listed here in alphabetical order.
\renewcommand
{
\indexsubitem
}{
(built-in function)
}
\begin{funcdesc}
{
abs
}{
x
}
Return the absolute value of a number. The argument may be a plain
or long integer or a floating point number.
or long integer or a floating point number. If the argument is a
complex number, its magnitude is returned.
\end{funcdesc}
\begin{funcdesc}
{
apply
}{
function
\,
args
\optional
{
, keywords
}}
...
...
@@ -221,7 +222,8 @@ module from which it is called).
\begin{funcdesc}
{
input
}{
\optional
{
prompt
}}
Almost equivalent to
\code
{
eval(raw
_
input(
\var
{
prompt
}
))
}
. Like
\code
{
raw
_
input()
}
, the
\var
{
prompt
}
argument is optional. The difference
\code
{
raw
_
input()
}
, the
\var
{
prompt
}
argument is optional, and GNU
readline is used when configured. The difference
is that a long input expression may be broken over multiple lines using
the backslash convention.
\end{funcdesc}
...
...
@@ -256,6 +258,15 @@ module from which it is called).
may be a sequence (string, tuple or list) or a mapping (dictionary).
\end{funcdesc}
\begin{funcdesc}
{
list
}{
sequence
}
Return a list whose items are the same and in the same order as
\var
{
sequence
}
's items. If
\var
{
sequence
}
is already a list,
a copy is made and returned, similar to
\code
{
\var
{
sequence
}
[:]
}
.
For instance,
\code
{
list('abc')
}
returns
returns
\code
{
['a', 'b', 'c']
}
and
\code
{
list( (1, 2, 3) )
}
returns
\code
{
[1, 2, 3]
}
.
\end{funcdesc}
\begin{funcdesc}
{
locals
}{}
Return a dictionary representing the current local symbol table.
Inside a function, modifying this dictionary does not always have the
...
...
@@ -400,6 +411,10 @@ there's no reliable way to determine whether this is the case.}
"Monty Python's Flying Circus"
>>>
\end{verbatim}
\ecode
If the interpreter was built to use the GNU readline library, then
\code
{
raw
_
input()
}
will use it to provide elaborate
line editing and history features.
\end{funcdesc}
\begin{funcdesc}
{
reduce
}{
function
\,
list
\optional
{
\,
initializer
}}
...
...
@@ -494,7 +509,7 @@ its goal is to return a printable string.
\begin{funcdesc}
{
tuple
}{
sequence
}
Return a tuple whose items are the same and in the same order as
\var
{
sequence
}
's items. If
\var
{
sequence
}
is alread a tuple, it
\var
{
sequence
}
's items. If
\var
{
sequence
}
is alread
y
a tuple, it
is returned unchanged. For instance,
\code
{
tuple('abc')
}
returns
returns
\code
{
('a', 'b', 'c')
}
and
\code
{
tuple([1, 2, 3])
}
returns
\code
{
(1, 2, 3)
}
.
...
...
Doc/libfuncs.tex
View file @
921f32ce
...
...
@@ -7,7 +7,8 @@ are always available. They are listed here in alphabetical order.
\renewcommand
{
\indexsubitem
}{
(built-in function)
}
\begin{funcdesc}
{
abs
}{
x
}
Return the absolute value of a number. The argument may be a plain
or long integer or a floating point number.
or long integer or a floating point number. If the argument is a
complex number, its magnitude is returned.
\end{funcdesc}
\begin{funcdesc}
{
apply
}{
function
\,
args
\optional
{
, keywords
}}
...
...
@@ -221,7 +222,8 @@ module from which it is called).
\begin{funcdesc}
{
input
}{
\optional
{
prompt
}}
Almost equivalent to
\code
{
eval(raw
_
input(
\var
{
prompt
}
))
}
. Like
\code
{
raw
_
input()
}
, the
\var
{
prompt
}
argument is optional. The difference
\code
{
raw
_
input()
}
, the
\var
{
prompt
}
argument is optional, and GNU
readline is used when configured. The difference
is that a long input expression may be broken over multiple lines using
the backslash convention.
\end{funcdesc}
...
...
@@ -256,6 +258,15 @@ module from which it is called).
may be a sequence (string, tuple or list) or a mapping (dictionary).
\end{funcdesc}
\begin{funcdesc}
{
list
}{
sequence
}
Return a list whose items are the same and in the same order as
\var
{
sequence
}
's items. If
\var
{
sequence
}
is already a list,
a copy is made and returned, similar to
\code
{
\var
{
sequence
}
[:]
}
.
For instance,
\code
{
list('abc')
}
returns
returns
\code
{
['a', 'b', 'c']
}
and
\code
{
list( (1, 2, 3) )
}
returns
\code
{
[1, 2, 3]
}
.
\end{funcdesc}
\begin{funcdesc}
{
locals
}{}
Return a dictionary representing the current local symbol table.
Inside a function, modifying this dictionary does not always have the
...
...
@@ -400,6 +411,10 @@ there's no reliable way to determine whether this is the case.}
"Monty Python's Flying Circus"
>>>
\end{verbatim}
\ecode
If the interpreter was built to use the GNU readline library, then
\code
{
raw
_
input()
}
will use it to provide elaborate
line editing and history features.
\end{funcdesc}
\begin{funcdesc}
{
reduce
}{
function
\,
list
\optional
{
\,
initializer
}}
...
...
@@ -494,7 +509,7 @@ its goal is to return a printable string.
\begin{funcdesc}
{
tuple
}{
sequence
}
Return a tuple whose items are the same and in the same order as
\var
{
sequence
}
's items. If
\var
{
sequence
}
is alread a tuple, it
\var
{
sequence
}
's items. If
\var
{
sequence
}
is alread
y
a tuple, it
is returned unchanged. For instance,
\code
{
tuple('abc')
}
returns
returns
\code
{
('a', 'b', 'c')
}
and
\code
{
tuple([1, 2, 3])
}
returns
\code
{
(1, 2, 3)
}
.
...
...
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