Bryan wrote: > 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? > >>> isinstance(1, object) True
What's 1 . len() ? regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list