Source From HereQuestion
I have a variable, x, and I want to know whether it is pointing to a function or not.
I had hoped I could do something like:
If this is for Python 2.x or for Python 3.2+, you can use callable(). It used to be deprecated, but is now undeprecated, so you can use it again. You can read the discussion here: http://bugs.python.org/issue10518. You can do this with: