diff -r 181ced5bf0be Doc/reference/datamodel.rst --- a/Doc/reference/datamodel.rst Mon Dec 02 05:53:35 2013 -0800 +++ b/Doc/reference/datamodel.rst Mon Dec 02 18:56:28 2013 +0000 @@ -508,9 +508,15 @@ | | or ``None`` if no arguments | | | | have a default value | | +-----------------------+-------------------------------+-----------+ + | :attr:`__defaults__` | Another way of spelling | Writable | + | | :attr:`func_defaults` | | + +-----------------------+-------------------------------+-----------+ | :attr:`func_code` | The code object representing | Writable | | | the compiled function body. | | +-----------------------+-------------------------------+-----------+ + | :attr:`__code__` | Another way of spelling | Writable | + | | :attr:`func_code` | | + +-----------------------+-------------------------------+-----------+ | :attr:`func_globals` | A reference to the dictionary | Read-only | | | that holds the function's | | | | global variables --- the | | @@ -518,14 +524,23 @@ | | module in which the function | | | | was defined. | | +-----------------------+-------------------------------+-----------+ + | :attr:`__globals__` | Another way of spelling | Read-only | + | | :attr:`func_globals` | | + +-----------------------+-------------------------------+-----------+ | :attr:`func_dict` | The namespace supporting | Writable | | | arbitrary function | | | | attributes. | | +-----------------------+-------------------------------+-----------+ + | :attr:`__dict__` | Another way of spelling | Writable | + | | :attr:`func_dict` | | + +-----------------------+-------------------------------+-----------+ | :attr:`func_closure` | ``None`` or a tuple of cells | Read-only | | | that contain bindings for the | | | | function's free variables. | | +-----------------------+-------------------------------+-----------+ + | :attr:`__closure__` | Another way of spelling | Read-only | + | | :attr:`func_closure` | | + +-----------------------+-------------------------------+-----------+ Most of the attributes labelled "Writable" check the type of the assigned value. @@ -542,16 +557,21 @@ code object; see the description of internal types below. .. index:: - single: func_doc (function attribute) single: __doc__ (function attribute) single: __name__ (function attribute) single: __module__ (function attribute) single: __dict__ (function attribute) + single: __defaults__ (function attribute) + single: __code__ (function attribute) + single: __globals__ (function attribute) + single: __closure__ (function attribute) + single: func_doc (function attribute) + single: func_name (function attribute) + single: func_dict (function attribute) single: func_defaults (function attribute) - single: func_closure (function attribute) single: func_code (function attribute) single: func_globals (function attribute) - single: func_dict (function attribute) + single: func_closure (function attribute) pair: global; namespace User-defined methods