language design question

Bryan belred at gmail.com
Tue Jul 11 01:28:13 EDT 2006


Fredrik Lundh wrote:
> Bryan wrote:
> 
>> could you get the same result by putting these methods in base
>  > class object that everything subclasses?
> 
> and how do you make sure that everything subclasses this base class ?
> 
> </F>
> 

in this hypothetical case, i was assuming len() would be put in object and every 
class subclasses object implicitly or explicitly (ie, new style classes only). 
if it was done that way, would len(obj) == obj.len() in all cases?


bryn





More information about the Python-list mailing list