Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Doc/library/inspect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
+-----------------+-------------------+---------------------------+
| | __self__ | instance to which a |
| | | method is bound, or |
| | | module object a function |
| | | was defined in, or |
| | | ``None`` |
+-----------------+-------------------+---------------------------+

Expand Down
3 changes: 2 additions & 1 deletion Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,8 @@ determined by the C function. Special read-only attributes:
* :attr:`!__doc__` is the function's documentation string, or ``None`` if
unavailable. See :attr:`function.__doc__`.
* :attr:`!__name__` is the function's name. See :attr:`function.__name__`.
* :attr:`!__self__` is set to ``None`` (but see the next item).
* :attr:`!__self__` is the module object the function was defined in or
``None`` if unavailable.
* :attr:`!__module__` is the name of
the module the function was defined in or ``None`` if unavailable.
See :attr:`function.__module__`.
Expand Down
3 changes: 2 additions & 1 deletion Lib/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ def isbuiltin(object):
Built-in functions and methods provide these attributes:
__doc__ documentation string
__name__ original name of this function or method
__self__ instance to which a method is bound, or None"""
__self__ instance to which a method is bound, or module object
a function was defined in, or None"""
return isinstance(object, types.BuiltinFunctionType)

def ismethodwrapper(object):
Expand Down
Loading