summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst50
1 files changed, 25 insertions, 25 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 2a71201..f6156a0 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -277,55 +277,55 @@ attributes:
.. function:: ismodule(object)
- Return true if the object is a module.
+ Return ``True`` if the object is a module.
.. function:: isclass(object)
- Return true if the object is a class, whether built-in or created in Python
+ 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 bound method written in Python.
+ Return ``True`` if the object is a bound method written in Python.
.. function:: isfunction(object)
- Return true if the object is a Python function, which includes functions
+ Return ``True`` if the object is a Python function, which includes functions
created by a :term:`lambda` expression.
.. function:: isgeneratorfunction(object)
- Return true if the object is a Python generator function.
+ Return ``True`` if the object is a Python generator function.
.. versionchanged:: 3.8
- Functions wrapped in :func:`functools.partial` now return true if the
+ Functions wrapped in :func:`functools.partial` now return ``True`` if the
wrapped function is a Python generator function.
.. function:: isgenerator(object)
- Return true if the object is a generator.
+ Return ``True`` if the object is a generator.
.. function:: iscoroutinefunction(object)
- Return true if the object is a :term:`coroutine function`
+ Return ``True`` if the object is a :term:`coroutine function`
(a function defined with an :keyword:`async def` syntax).
.. versionadded:: 3.5
.. versionchanged:: 3.8
- Functions wrapped in :func:`functools.partial` now return true if the
+ Functions wrapped in :func:`functools.partial` now return ``True`` if the
wrapped function is a :term:`coroutine function`.
.. function:: iscoroutine(object)
- Return true if the object is a :term:`coroutine` created by an
+ Return ``True`` if the object is a :term:`coroutine` created by an
:keyword:`async def` function.
.. versionadded:: 3.5
@@ -333,7 +333,7 @@ attributes:
.. function:: isawaitable(object)
- Return true if the object can be used in :keyword:`await` expression.
+ Return ``True`` if the object can be used in :keyword:`await` expression.
Can also be used to distinguish generator-based coroutines from regular
generators::
@@ -352,7 +352,7 @@ attributes:
.. function:: isasyncgenfunction(object)
- Return true if the object is an :term:`asynchronous generator` function,
+ Return ``True`` if the object is an :term:`asynchronous generator` function,
for example::
>>> async def agen():
@@ -364,50 +364,50 @@ attributes:
.. versionadded:: 3.6
.. versionchanged:: 3.8
- Functions wrapped in :func:`functools.partial` now return true if the
+ Functions wrapped in :func:`functools.partial` now return ``True`` if the
wrapped function is a :term:`asynchronous generator` function.
.. function:: isasyncgen(object)
- Return true if the object is an :term:`asynchronous generator iterator`
+ Return ``True`` if the object is an :term:`asynchronous generator iterator`
created by an :term:`asynchronous generator` function.
.. versionadded:: 3.6
.. function:: istraceback(object)
- Return true if the object is a traceback.
+ Return ``True`` if the object is a traceback.
.. function:: isframe(object)
- Return true if the object is a frame.
+ Return ``True`` if the object is a frame.
.. function:: iscode(object)
- Return true if the object is a code.
+ Return ``True`` if the object is a code.
.. function:: isbuiltin(object)
- Return true if the object is a built-in function or a bound built-in method.
+ 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.
+ 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.
+ Return ``True`` if the object is an abstract base class.
.. function:: ismethoddescriptor(object)
- Return true if the object is a method descriptor, but not if
+ Return ``True`` if the object is a method descriptor, but not if
:func:`ismethod`, :func:`isclass`, :func:`isfunction` or :func:`isbuiltin`
are true.
@@ -418,14 +418,14 @@ attributes:
sensible, and :attr:`__doc__` often is.
Methods implemented via descriptors that also pass one of the other tests
- return false from the :func:`ismethoddescriptor` test, simply because the
+ return ``False`` from the :func:`ismethoddescriptor` test, simply because the
other tests promise more -- you can, e.g., count on having the
:attr:`__func__` attribute (etc) when an object passes :func:`ismethod`.
.. function:: isdatadescriptor(object)
- Return true if the object is a data descriptor.
+ Return ``True`` if the object is a data descriptor.
Data descriptors have both a :attr:`~object.__get__` and a :attr:`~object.__set__` method.
Examples are properties (defined in Python), getsets, and members. The
@@ -438,7 +438,7 @@ attributes:
.. function:: isgetsetdescriptor(object)
- Return true if the object is a getset descriptor.
+ Return ``True`` if the object is a getset descriptor.
.. impl-detail::
@@ -449,7 +449,7 @@ attributes:
.. function:: ismemberdescriptor(object)
- Return true if the object is a member descriptor.
+ Return ``True`` if the object is a member descriptor.
.. impl-detail::