mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Remove apply()
This commit is contained in:
parent
fe55464f39
commit
d91085598f
56 changed files with 179 additions and 285 deletions
|
|
@ -1169,26 +1169,6 @@ bypass these functions without concerns about missing something important.
|
|||
|
||||
\setindexsubitem{(non-essential built-in functions)}
|
||||
|
||||
\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. The \var{function} is
|
||||
called with \var{args} as the argument list; the number of arguments
|
||||
is 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 argument list.
|
||||
Calling \function{apply()} is different from just calling
|
||||
\code{\var{function}(\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})}.
|
||||
Use of \function{apply()} is not necessary since the ``extended call
|
||||
syntax,'' as used in the last example, is completely equivalent.
|
||||
|
||||
\deprecated{2.3}{Use the extended call syntax instead, as described
|
||||
above.}
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{buffer}{object\optional{, offset\optional{, size}}}
|
||||
The \var{object} argument must be an object that supports the buffer
|
||||
call interface (such as strings, arrays, and buffers). A new buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue