[Tutor] Can this be done easly

Roelof Wobben rwobben at hotmail.com
Sun Sep 19 18:07:26 CEST 2010




----------------------------------------
> To: tutor at python.org
> From: __peter__ at web.de
> Date: Sun, 19 Sep 2010 18:04:25 +0200
> Subject: Re: [Tutor] Can this be done easly
>
> Roelof Wobben wrote:
>
>> When I change everything to this :
>
>> I get this message :
>>
>> Traceback (most recent call last):
>> File "C:\Users\wobben\workspace\oefeningen\src\test.py", line 13, in
>> 
>> rechthoek = Rectangle (punt,20,30)
>> TypeError: object.__new__() takes no parameters
>
> Hint: why does this work:
>
>> def __init__(self, x=0, y=0):
>
> ...while this doesnt:
>
>> def _init_(self, base_point, width=0, length=0):
>
> Peter
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

Hoi, 
 
Maybe because base_point has no value ?

Roelof
  		 	   		  


More information about the Tutor mailing list