callable() checking object callable or not

Returns Booleans, True if callable , False otherwise.
print(callable(a)) # False
print(callable(x)) # False
print(callable(my_list)) # False 
All above objects are not Callable. Using Class and Objects
class student_kit():
    #instance attributes
    def __init__(self,name): name
Alex=student_kit('Alex')  # object declaration
print(callable(student_kit)) # True
print(callable(Alex)) # False , object is not callable
#Alex()   # this will generate error 
The last line will generate error like this.
TypeError: 'student_kit' object is not callable
The class student_kit is callable, the object Alex is not cllable.
All Built in Functions in Python bytes()

Post your comments , suggestion , error , requirements etc here

We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 All rights reserved worldwide Privacy Policy Disclaimer