Small fixes for description of function attributes.
func_closure is a readonly attribute. Add \ttindex{} for func_closure. Remove discussion of func_closure specific to 2.1.
This commit is contained in:
parent
2f6ef4c630
commit
26c49b66bb
|
@ -414,24 +414,22 @@ defines the global namespace of the module in which the function was
|
||||||
defined; \member{func_dict} or \member{__dict__} contains the
|
defined; \member{func_dict} or \member{__dict__} contains the
|
||||||
namespace supporting arbitrary function attributes;
|
namespace supporting arbitrary function attributes;
|
||||||
\member{func_closure} is \code{None} or a tuple of cells that contain
|
\member{func_closure} is \code{None} or a tuple of cells that contain
|
||||||
binding for the function's free variables.
|
bindings for the function's free variables.
|
||||||
|
|
||||||
Of these, \member{func_code}, \member{func_defaults}, \member{func_closure},
|
Of these, \member{func_code}, \member{func_defaults},
|
||||||
\member{func_doc}/\member{__doc__}, and
|
\member{func_doc}/\member{__doc__}, and
|
||||||
\member{func_dict}/\member{__dict__} may be writable; the
|
\member{func_dict}/\member{__dict__} may be writable; the
|
||||||
others can never be changed. Additional information about a
|
others can never be changed. Additional information about a
|
||||||
function's definition can be retrieved from its code object; see the
|
function's definition can be retrieved from its code object; see the
|
||||||
description of internal types below.
|
description of internal types below.
|
||||||
|
|
||||||
In Python 2.1, the \member{func_closure} slot is always \code{None}
|
|
||||||
unless nested scopes are enabled. (See the appendix.)
|
|
||||||
|
|
||||||
\withsubitem{(function attribute)}{
|
\withsubitem{(function attribute)}{
|
||||||
\ttindex{func_doc}
|
\ttindex{func_doc}
|
||||||
\ttindex{__doc__}
|
\ttindex{__doc__}
|
||||||
\ttindex{__name__}
|
\ttindex{__name__}
|
||||||
\ttindex{__dict__}
|
\ttindex{__dict__}
|
||||||
\ttindex{func_defaults}
|
\ttindex{func_defaults}
|
||||||
|
\ttindex{func_closure}
|
||||||
\ttindex{func_code}
|
\ttindex{func_code}
|
||||||
\ttindex{func_globals}
|
\ttindex{func_globals}
|
||||||
\ttindex{func_dict}}
|
\ttindex{func_dict}}
|
||||||
|
|
Loading…
Reference in New Issue