Python "object" as root object

Fredrik Lundh fredrik at pythonware.com
Wed May 25 08:03:19 BST 2005


John A Meinel wrote:

> I think it was python 2.2 or 2.3 where python introduced the 'object'
> superclass. Basically all classes should really inherit from object at
> the lowest level. That is what enables you to use functions like 'super()'
>
> Is there a reason why none of bzr's classes use this idiom? It isn't
> extremely different, but I thought it was the correct way to do things.

"may inherit from", not "should inherit from".

you don't have to use "newish" features if you don't need them.  using "old
style" classes in new code is perfectly okay.

</F> 







More information about the bazaar mailing list