diff options
author | Georg Brandl <georg@python.org> | 2011-01-06 09:23:56 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-01-06 09:23:56 (GMT) |
commit | b30f3303f70b2a73bd9dec068edcdf78a1c71096 (patch) | |
tree | 4b2206ed4e452ab2ffbd89459005d88b9e9db99c /Doc/library/inspect.rst | |
parent | 77041b23540764ef0cd4eec4f1368c740daff338 (diff) | |
download | cpython-b30f3303f70b2a73bd9dec068edcdf78a1c71096.zip cpython-b30f3303f70b2a73bd9dec068edcdf78a1c71096.tar.gz cpython-b30f3303f70b2a73bd9dec068edcdf78a1c71096.tar.bz2 |
Fix various issues (mostly Python 2 relics) found by Jacques Ducasse.
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r-- | Doc/library/inspect.rst | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index a95e16f..ac7284c 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -176,17 +176,16 @@ attributes: .. function:: getmoduleinfo(path) - Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode, - module_type)`` of values that describe how Python will interpret the file - identified by *path* if it is a module, or ``None`` if it would not be - identified as a module. The return tuple is ``(name, suffix, mode, mtype)``, - where *name* is the name of the module without the name of any enclosing - package, *suffix* is the trailing part of the file name (which may not be a - dot-delimited extension), *mode* is the :func:`open` mode that would be used - (``'r'`` or ``'rb'``), and *mtype* is an integer giving the type of the - module. *mtype* will have a value which can be compared to the constants - defined in the :mod:`imp` module; see the documentation for that module for - more information on module types. + Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode, module_type)`` + of values that describe how Python will interpret the file identified by + *path* if it is a module, or ``None`` if it would not be identified as a + module. In that tuple, *name* is the name of the module without the name of + any enclosing package, *suffix* is the trailing part of the file name (which + may not be a dot-delimited extension), *mode* is the :func:`open` mode that + would be used (``'r'`` or ``'rb'``), and *module_type* is an integer giving + the type of the module. *module_type* will have a value which can be + compared to the constants defined in the :mod:`imp` module; see the + documentation for that module for more information on module types. .. function:: getmodulename(path) @@ -391,12 +390,12 @@ Classes and functions .. function:: getargspec(func) Get the names and default values of a Python function's arguments. A - :term:`named tuple` ``ArgSpec(args, varargs, keywords, - defaults)`` is returned. *args* is a list of - the argument names. *varargs* and *varkw* are the names of the ``*`` and - ``**`` arguments or ``None``. *defaults* is a tuple of default argument - values or None if there are no default arguments; if this tuple has *n* - elements, they correspond to the last *n* elements listed in *args*. + :term:`named tuple` ``ArgSpec(args, varargs, keywords, defaults)`` is + returned. *args* is a list of the argument names. *varargs* and *keywords* + are the names of the ``*`` and ``**`` arguments or ``None``. *defaults* is a + tuple of default argument values or None if there are no default arguments; + if this tuple has *n* elements, they correspond to the last *n* elements + listed in *args*. .. deprecated:: 3.0 Use :func:`getfullargspec` instead, which provides information about @@ -425,8 +424,8 @@ Classes and functions Get information about arguments passed into a particular frame. A :term:`named tuple` ``ArgInfo(args, varargs, keywords, locals)`` is - returned. *args* is a list of the argument names. *varargs* and *varkw* are - the names of the ``*`` and ``**`` arguments or ``None``. *locals* is the + returned. *args* is a list of the argument names. *varargs* and *keywords* + are the names of the ``*`` and ``**`` arguments or ``None``. *locals* is the locals dictionary of the given frame. |