TypeError: 'module object is not callable'
Diez B. Roggisch
deets at nospam.web.de
Mon Sep 3 08:22:14 EDT 2007
christophertidy at hotmail.com wrote:
> Thank you for your help that seems to have done the trick.
> You are correct Diez B. Roggisch that I come from a java background!
>
> I have a new tiny problem I can't understand either.
> Withing Step.py I have the following method
>
> def isCompleted(self):
> "Check whether data step has been processed"
> return self.isCompleted
>
> Then within main.py I simply wish to print the value of isCompleted
> which I try to do by the following
> print 'Magn completed status is',a.isCompleted()
>
> Which returns the following error:
> a.isCompleted()
> TypeError: 'int' object is not callable
>
> I have tried ideas such as int(a.isCompleted) but to no prevail. Any
> ideas?
The others spottet the error I missed. But I can offer something else:
http://dirtsimple.org/2004/12/python-is-not-java.html
It's a worthy read for someone coming from Java, needing time to adjust.
Diez
More information about the Python-list
mailing list