[Tutor] Can this be done easly

Peter Otten __peter__ at web.de
Sun Sep 19 18:27:54 CEST 2010


Roelof Wobben wrote:

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

> Maybe because base_point has no value ?

No. One __init__ has two underscores (correct) on each side, the other 
_init_ only one (wrong).



More information about the Tutor mailing list