Why new Python 2.5 feature "class C()" return old-style class ?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Tue Apr 11 09:46:59 EDT 2006


bruno at modulix>Since the class statement without superclass actually
creates an old-style class, I'd expect the "class MyClass():" variant
to behave the same.<

In Python 3.0 I really hope the

class C: pass
class C(): pass
class C(object): pass

will mean the same thing. (So in Python 2.5 the second version can be
made to mean the same thing of the third).

Bye,
bearophile




More information about the Python-list mailing list