Inheriting from object

Fuzzyman fuzzyman at gmail.com
Wed Jun 29 14:55:32 EDT 2005


Hello,

To create a classic (old style) class, I write :

class foo:
    pass

To do the equivalent as a new style class, I write :

class foo(object):
    pass

*Should* I in fact write :

class foo(object):
    def __init__(self, *args, **kwargs):
        object.__init__(self)

?

Also, can anyone explain any tangible benefit of inheriting from
object, when not explicitly using any features of new style classes ?

Thanks :-)

Fuzzyman
http://www.voidspace.org.uk/python




More information about the Python-list mailing list