What is Type Error?

Wolfgang Strobl ws at mystrobl.de
Sun Nov 18 02:23:56 EST 2001


On Sun, 18 Nov 2001 14:58:07 +0800, Calvin <ee_fhw at stu.ust.hk> wrote :

>Greetings,
>	I'm developing a simlator for LCD and get stuck with the Type Error. The 
>attached is my LCD.py file, when compile I got the following error:

...

>self.__energy[n]=1/2(self.__lc.k1(self.__azimuth[n])*d_azimuth**2+self.__lc.k2(self.__azimuth[n])*d_twist**2 
>+self.__lc.k3(self.__azimuth[n])*d_twist**2)
>TypeError: object of type 'int' is not callable
>
>could anybody point out how can I solve it, I just got no ideas :(


>>> print 1/2(3)
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
TypeError: object of type 'int' is not callable

>>> print 1/2 * 3
0
>>> print 1/2.0 * 3
1.5
>>> 


-- 
Thank you for observing all safety precautions



More information about the Python-list mailing list