Built-in Functions and Types

callable()

Determine whether an object appears to support call syntax. Functions, classes and instances whose type implements __call__() normally qualify. A true result does not guarantee that a particular argument list will work or that executing the call will succeed. A false result means the object cannot be called in its present state.

Formal Syntax & Structure

python syntaxpython
callable(object, /)

Parameters & Attributes

NameTypeDescription
objectobjectObject to inspect.

Return Value

bool

True when the object appears callable, otherwise False.

Working Example

Example Snippetpython
def greet(name):    return "Hello " + name
print(callable(greet))print(callable("greet"))
Python Reference