less obvious "super"

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Mon Sep 10 14:42:50 CEST 2007

Nagarajan a écrit :
> What's the difference b/w:
>      class A:
> and
>      class A ( object ):

The first one creates a 'classic' (aka 'old-style') class, IOW a class 
using the legacy object-model of Python < 2.2. The second one creates a 
'new-style' class using the new (well... since Python 2.2, which is not 
that new) and far more powerfull object model. Unless you need to 
support antique Python version, there's no good reason IMHO to use 
old-style classes.

More information about the Python-list mailing list