[Tutor] a class query

Payal payal-python at scriptkitchen.com
Tue Jun 8 08:10:38 CEST 2010


On Tue, Jun 08, 2010 at 02:11:10AM +1000, Steven D'Aprano wrote:
> In Python 2.x, all classes are old-style unless you directly or 
> indirectly inherit from object. If you inherit from nothing, it is an 
> old-style class regardless of whether you say 
> 
> class Name: pass
> 
> or 
> 
> class Name(): pass
> 
> In Python 3.x, there are no old-style classes.

Thanks, that clears my doubt.


With warm regards,
-Payal
-- 



More information about the Tutor mailing list