looping wrote:
> For Python developers around.
> 
>>From Python 2.5 doc:
> The list of base classes in a class definition can now be empty. As an
> example, this is now legal:
>   class C():
>       pass
> 
> nice but why this syntax return old-style class, same as "class C:",
> and not the new style "class C(object):" ?
> Old-style class are somewhat deprecated and could be almost always be
> replaced by new-style class, so this syntax could be a nice shortcut to
> create them.
> 
> Am I wrong or is there something that I've missed ?

class C():

is meant to be synonymous with

class C:

and therefore cannot create a new-style class.

Georg
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to