TypeError: 'module' object is not callable

randomtalk at gmail.com randomtalk at gmail.com
Fri Mar 16 13:42:49 EDT 2007


Hello everyone!
i have the following test code:
class temp:
    def __init__(self):
        self.hello = "hello world!"
    def printworld(self):
        print(self.hello)
t = temp()

and i tried to call profile('t.printworld()')

but i received the following error:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: 'module' object is not callable

I'm not sure what is wrong exactly, if anyone can point me to the
right direction, it would be much appreciated!




More information about the Python-list mailing list