Class

Robert Amesz mailto
Wed Nov 7 20:37:23 EST 2001


Fredrik Lundh wrote:

> Edy Lie wrote:
>> Hi I have setup a class but in the code i could not use it. Anyone
>> care to explain ? 
> 
> hint: it's usually easier to for the readers of this forum to
> figure out what's wrong if you include the error message.
> 
> did you get this message?
> 
> Traceback (most recent call last):
>   File "\qq.py", line 19, in ?
>     add = DataBase()
> TypeError: __init__() takes exactly 5 arguments (1 given)

You're right about the argument count thing, but I suspect he doesn't 
even get that far, but is greeted by the the 'Wrong input' response all 
the time, whatever he types. My hint is: type 
  1=='1'
at the interpreter prompt, and see what you get. Python is dynamically 
typed, *not* weakly typed, no sir.


Robert Amesz
-- 
And thank G. for that...



More information about the Python-list mailing list