[Ncr-Python.in] What is wrong in this declaration ?

gaurav luthra gauravluthra06 at gmail.com
Sun Apr 10 19:28:58 CEST 2011


On Sun, Apr 10, 2011 at 4:37 AM, Narendra Sisodiya <
narendra at narendrasisodiya.com> wrote:

> class Function_Timer():
>     def __init__(self, duration, function, args=[], kwargs={}):
>
> ???
>
> I am getting error
>
> import Function_Scheduler
> aa= Function_Scheduler.PythonTimer(5.0, hello)
>
> Traceback (most recent call last):
>   File "<input>", line 1, in <module>
> TypeError: 'module' object is not callable
>

One error was the different names of the class declaration and and import
statement,which you have resolved.
One more thing I observe here is the classname syntax error.ie. class
Function_TImer(): (the parentheses are illegal in a class definition.)

-- 
~GAURAV LUTHRA~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ncr-python.in/attachments/20110410/cb14063b/attachment.html>


More information about the Ncr-Python.in mailing list