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, ...)
+ callable(argument1, argument2, argumentN)
A :term:`function`, and by extension a :term:`method`, is a callable.
An instance of a class that implements the :meth:`~object.__call__`
class C:
@staticmethod
- def f(arg1, arg2, ...): ...
+ def f(arg1, arg2, argN): ...
The ``@staticmethod`` form is a function :term:`decorator` -- see
:ref:`function` for details.
class C(metaclass=ABCMeta):
@abstractmethod
- def my_abstract_method(self, ...):
+ def my_abstract_method(self, arg1, arg2, argN):
...
"""
funcobj.__isabstractmethod__ = True
class C:
@classmethod
- def f(cls, arg1, arg2, ...):
+ def f(cls, arg1, arg2, argN):
...
It can be called either on the class (e.g. C.f()) or on an instance
\n\
class C:\n\
@classmethod\n\
- def f(cls, arg1, arg2, ...):\n\
+ def f(cls, arg1, arg2, argN):\n\
...\n\
\n\
It can be called either on the class (e.g. C.f()) or on an instance\n\
class C:
@staticmethod
- def f(arg1, arg2, ...):
+ def f(arg1, arg2, argN):
...
It can be called either on the class (e.g. C.f()) or on an instance
\n\
class C:\n\
@staticmethod\n\
- def f(arg1, arg2, ...):\n\
+ def f(arg1, arg2, argN):\n\
...\n\
\n\
It can be called either on the class (e.g. C.f()) or on an instance\n\