⬅︎ Back to callable Python objects
"the callable built-in function is going to be gone in Python 3.0"in that case, hasattr(foo, '__call__') seems more logical (to a second hand reader) than catching the exception, in my opinion..
Comment
"the callable built-in function is going to be gone in Python 3.0"
in that case, hasattr(foo, '__call__') seems more logical (to a second hand reader) than catching the exception, in my opinion..