Function Details: callable

Description


Returns True if the object argument appears callable, False if not.


Extended Description


The callable() function checks whether the object passed to it appears to be callable (i.e., can be called as a function). An object is considered callable if it's a function, a method, a class with a __call__ method, or an instance of a class with a __call__ method. Note that callable() returns True if the object appears callable, but calling the object may still fail.


Read More about callable from Python Documentation

Function Signature


callable(object: Any) -> bool

Module: builtins

Parameters


object: Any Python object to be checked for callability.


Parameter List


  • object: Any

Return


Returns a boolean value: True if the object appears callable, False otherwise.


Return Type


bool

Output

Explanation

This example demonstrates callable() with various types of objects, including functions, numbers, and methods.