diff options
author | Georg Brandl <georg@python.org> | 2010-10-15 16:53:24 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-10-15 16:53:24 (GMT) |
commit | 39cadc3ffee3d2853cec3bb4019d35a51954b64a (patch) | |
tree | b6bde6c9eedf51fa2c29855ad5b3a096ffa93112 | |
parent | d0b0e1d8690f5c8534e129bac626175f31068b7a (diff) | |
download | cpython-39cadc3ffee3d2853cec3bb4019d35a51954b64a.zip cpython-39cadc3ffee3d2853cec3bb4019d35a51954b64a.tar.gz cpython-39cadc3ffee3d2853cec3bb4019d35a51954b64a.tar.bz2 |
#4968: updates to inspect.is* function docs.
-rw-r--r-- | Doc/library/inspect.rst | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 0f54376..1f5e72e 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -204,18 +204,19 @@ attributes: .. function:: isclass(object) - Return true if the object is a class. + Return true if the object is a class, whether built-in or created in Python + code. .. function:: ismethod(object) - Return true if the object is a method. + Return true if the object is a bound method written in Python. .. function:: isfunction(object) - Return true if the object is a Python function or unnamed (:term:`lambda`) - function. + Return true if the object is a Python function, which includes functions + created by a :term:`lambda` expression. .. function:: isgeneratorfunction(object) @@ -245,13 +246,14 @@ attributes: .. function:: isbuiltin(object) - Return true if the object is a built-in function. + Return true if the object is a built-in function or a bound built-in method. .. function:: isroutine(object) Return true if the object is a user-defined or built-in function or method. + .. function:: isabstract(object) Return true if the object is an abstract base class. @@ -259,8 +261,9 @@ attributes: .. function:: ismethoddescriptor(object) - Return true if the object is a method descriptor, but not if :func:`ismethod` - or :func:`isclass` or :func:`isfunction` are true. + Return true if the object is a method descriptor, but not if + :func:`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin` + are true. This, for example, is true of ``int.__add__``. An object passing this test has a :attr:`__get__` attribute but not a :attr:`__set__` attribute, but |