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

Narendra Sisodiya narendra at narendrasisodiya.com
Mon Apr 11 09:39:35 CEST 2011


On Sun, Apr 10, 2011 at 10:58 PM, gaurav luthra <gauravluthra06 at gmail.com>wrote:

>
>
> 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.)
>


Thanks ! I will correct it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ncr-python.in/attachments/20110411/aceb3d2c/attachment.html>


More information about the Ncr-Python.in mailing list