diff options
author | Georg Brandl <georg@python.org> | 2006-07-29 08:51:21 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-07-29 08:51:21 (GMT) |
commit | 9fd21e31b6683e532949bbf650bb9decee4f42a4 (patch) | |
tree | 7571b053cbf2b001e8ed850056abc2c720096aac /Doc | |
parent | 1393d6a4ca6b2fa6c736b46ff398ebde2f0e8364 (diff) | |
download | cpython-9fd21e31b6683e532949bbf650bb9decee4f42a4.zip cpython-9fd21e31b6683e532949bbf650bb9decee4f42a4.tar.gz cpython-9fd21e31b6683e532949bbf650bb9decee4f42a4.tar.bz2 |
Bug #835255: The "closure" argument to new.function() is now documented.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libnew.tex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/lib/libnew.tex b/Doc/lib/libnew.tex index 5edc95da..d0394d1 100644 --- a/Doc/lib/libnew.tex +++ b/Doc/lib/libnew.tex @@ -30,13 +30,16 @@ unbound if \var{instance} is \code{None}. \var{function} must be callable. \end{funcdesc} -\begin{funcdesc}{function}{code, globals\optional{, name\optional{, argdefs}}} +\begin{funcdesc}{function}{code, globals\optional{, name\optional{, + argdefs\optional{, closure}}}} Returns a (Python) function with the given code and globals. If \var{name} is given, it must be a string or \code{None}. If it is a string, the function will have the given name, otherwise the function name will be taken from \code{\var{code}.co_name}. If \var{argdefs} is given, it must be a tuple and will be used to -determine the default values of parameters. +determine the default values of parameters. If \var{closure} is given, +it must be \code{None} or a tuple of cell objects containing objects +to bind to the names in \code{\var{code}.co_freevars}. \end{funcdesc} \begin{funcdesc}{code}{argcount, nlocals, stacksize, flags, codestring, |