summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-11-07 06:22:25 (GMT)
committerFred Drake <fdrake@acm.org>2001-11-07 06:22:25 (GMT)
commit66ded524bade9e7299cd2cba3d9136f56b2a5f55 (patch)
treec3bd6b787f13b85c08bb96a8173f03c500be1cb1
parent6f0699bc099d8f7a05f8a9eb206f4f37ac5c9ca1 (diff)
downloadcpython-66ded524bade9e7299cd2cba3d9136f56b2a5f55.zip
cpython-66ded524bade9e7299cd2cba3d9136f56b2a5f55.tar.gz
cpython-66ded524bade9e7299cd2cba3d9136f56b2a5f55.tar.bz2
apply() documentation: Remove a detail about the implementation that does
not affect the API. Clean up the text about call syntax apply() is equivalent to. Based on comments by Thomas Guettler.
-rw-r--r--Doc/lib/libfuncs.tex11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex
index 1ea8c10..70d7cdb 100644
--- a/Doc/lib/libfuncs.tex
+++ b/Doc/lib/libfuncs.tex
@@ -65,15 +65,16 @@ def my_import(name):
\begin{funcdesc}{apply}{function, args\optional{, keywords}}
The \var{function} argument must be a callable object (a
user-defined or built-in function or method, or a class object) and
- the \var{args} argument must be a sequence (if it is not a tuple,
- the sequence is first converted to a tuple). The \var{function} is
+ the \var{args} argument must be a sequence. The \var{function} is
called with \var{args} as the argument list; the number of arguments
- is the the length of the tuple. (This is different from just
- calling \code{\var{func}(\var{args})}, since in that case there is
- always exactly one argument.)
+ is the the length of the tuple.
If the optional \var{keywords} argument is present, it must be a
dictionary whose keys are strings. It specifies keyword arguments
to be added to the end of the the argument list.
+ Calling \function{apply()} is different from just calling
+ \code{\var{func}(\var{args})}, since in that case there is always
+ exactly one argument. The use of \function{apply()} is equivalent
+ to \code{\var{function}(*\var{args}, **\var{keywords})}.
\end{funcdesc}
\begin{funcdesc}{buffer}{object\optional{, offset\optional{, size}}}