Fredrik Lundh wrote:
> Bruno Desthuilliers wrote:
> 
> 
>>As a matter of fact, in Python, the class is an attribute of an object.
> 
> 
> except when it isn't.

Which are the cases where it isn't ?

> 
>>>def add_role(self, role_class):
>>>   self.roles.append(role_class(self))
>>
>>And here you create a circular reference between object and roles...
> 
> 
> and ?  Python has a garbage collector, you know...

Yes. But garbage collection is not cost-free AFAIK.


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'.split('@')])"
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to