Object Not Callable, float?

Terry Reedy tjreedy at udel.edu
Mon Nov 30 22:47:49 CET 2009

W. eWatson wrote:

> I think I understand it, but how does one prevent it from happening, or 
> know it's the cause? That msg I got?

Yes. The message 'x is not callable', where x is a name of something you 
expect to be callable (such as the builtin functions and classes), 
signals that x has been rebound to a non-callable object.

On the other hand, if x is something you know not to be callable, there 
there is either a typo -- yxz(3) instead of yzx[3] -- or a bug such as
expr(arg) where you expect expr to evaluate to a function but it does 
not.  Say yzx[3]('abc') where you think yxz is a list of functions, or 
yzx(3)('abc') where you expect yzx to return a function.


More information about the Python-list mailing list