use of super()

Robert Collins robertc at robertcollins.net
Thu Jan 5 01:54:57 GMT 2006


I just ran into the following:

    def setUp(self):
        super(self.__class__, self).setUp()

This does not work - it results in the wrong code when further
subclassing occurs.

super must always be 'super(THECURRENTCLSASNAME, self).method()'

Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060105/f87476b7/attachment.pgp 


More information about the bazaar mailing list