Which special method allows an object to be called like a function in Python?
Correct answer
B. __call__
7 views
B. __call__
7 views
Defining __call__ makes instances callable.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is B? Ask here and get an explanation.