On 15/01/2015 00:40, Steven D'Aprano wrote:
jason wrote:

class B(A):
       def __init__(self, s):
             A.__init__(self, s)

Unrelated:

It is better to call super than manually call the superclass. Calling A
directly means your class is no longer compatible with multiple
inheritance.

     def __init__(self, s):
         super(B, self).__init__(s)


For the OP an excellent article on super here https://rhettinger.wordpress.com/2011/05/26/super-considered-super/

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to