]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-95276: Add callable entry to the glossary (GH-95738)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 12 Oct 2022 02:50:25 +0000 (19:50 -0700)
committerPablo Galindo <pablogsal@gmail.com>
Sat, 22 Oct 2022 19:04:44 +0000 (20:04 +0100)
(cherry picked from commit e3bf125c81d5da0734429c1cb6ae75e6086e35ae)

Co-authored-by: MonadChains <monadchains@gmail.com>
Doc/glossary.rst

index e0dd4fc96760e76a219a7da013588b074a4d1cc4..9550b986bf473dabfff7911c8fb5d4c46aa8371a 100644 (file)
@@ -203,6 +203,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.