object creation

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Fri Nov 14 19:36:17 EST 2008


On Fri, 14 Nov 2008 16:38:15 -0700, Joe Strout wrote:

> On Nov 14, 2008, at 4:33 PM, Jerry Hill wrote:
> 
>> Then add
>> def __init__(self):
>>  a = 0
>>  b = 0
>>
>> to your box class to make a and b instance variables.
> 
> Doesn't that have to be "self.a" and "self.b"?


Only if you want it to work :)




-- 
Steven



More information about the Python-list mailing list