diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-03-18 10:18:53 -0700 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-03-18 10:18:53 -0700 |
commit | e09a30cdba41c4192e324c0dbf5327ca2ba3ec66 (patch) | |
tree | f7ed569725b5d8ebf56cb609bb83071e38e3cd8a | |
parent | 4453240a90c50df0aee021342e4c7a847b7d13ed (diff) | |
download | six-e09a30cdba41c4192e324c0dbf5327ca2ba3ec66.tar.gz |
say what attribute you're actually getting
-rw-r--r-- | documentation/index.rst | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/documentation/index.rst b/documentation/index.rst index 0880cad..90f5e6e 100644 --- a/documentation/index.rst +++ b/documentation/index.rst @@ -129,22 +129,29 @@ functions and methods is the stdlib :mod:`py3:inspect` module. .. function:: get_function_closure(func) - Get the closure (list of cells) associated with *func*. + Get the closure (list of cells) associated with *func*. This is equivalent + to ``func.__closure__`` on Python 2.6+ and ``func.func_closure`` on Python + 2.4 and 2.5. .. function:: get_function_code(func) - Get the code object associated with *func*. + Get the code object associated with *func*. This is equivalent to + ``func.__code__`` on Python 2.6+ and ``func.func_code`` on Python 2.4 and + 2.5. .. function:: get_function_defaults(func) - Get the defaults tuple associated with *func*. + Get the defaults tuple associated with *func*. This is equivalent to + ``func.__defaults__`` on Python 2.6+ and ``func.func_defaults`` on Python 2.4 + and 2.5. .. function:: get_function_globals(func) - Get the globals of *func*. + Get the globals of *func*. This is equivalent to ``func.__globals__`` on + Python 2.6+ and ``func.func_globals`` on Python 2.4 and 2.5. .. function:: next(it) |