Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Stef Mientki wrote:
> 
>> What's the difference between using __init__ and using nothing,
>> as the examples below.
>>
>> class cpu:
>>    PC = 4
> 
> This is a *class attribute*.  It's the same for all instances of `cpu`.
> 
>> class cpu:
>>    def __init__:
>>      self.PC = 4
> 
> This is an *instance attribute* which is set in every instance of `cpu`.
>
thanks Marc,

Oh so obvious, why didn't I discovered that myself ;-)

cheers,
Stef
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to