I am reading a Python book for Pyton 2.5 (But I am doing Python 3). I am at the chapter classes and I got this part;
"You can check whenever the function attribute was callable."
callable(tc,'talk',None)
In Python3 we do not have callable anymore, so I checked on the internet, how do it, and I found this:
hasattr(anything, '__call__')
Now here are my question:
1.) What do I have to put in the "anything" part? a function of a class?
2.) What does callable actually do? What does callable actually means? To check when was the last time I used that function..? What does it do? And what kind of situatins would I use this?
Thanks in advance