]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-95276: Add callable entry to the glossary (#95738)
authorMonadChains <monadchains@gmail.com>
Wed, 12 Oct 2022 02:41:08 +0000 (04:41 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Oct 2022 02:41:08 +0000 (19:41 -0700)
Doc/glossary.rst

index 9385b8ddd13d1047e60f8086bbb7e2b00bb269bd..59f9426f603172c9bab2373e262cdbe7c3362122 100644 (file)
@@ -210,6 +210,16 @@ Glossary
       A list of bytecode instructions can be found in the documentation for
       :ref:`the dis module <bytecodes>`.
 
+   callable
+      A callable is an object that can be called, possibly with a set
+      of arguments (see :term:`argument`), with the following syntax::
+
+         callable(argument1, argument2, ...)
+
+      A :term:`function`, and by extension a :term:`method`, is a callable.
+      An instance of a class that implements the :meth:`~object.__call__`
+      method is also a callable.
+
    callback
       A subroutine function which is passed as an argument to be executed at
       some point in the future.