[PyQt] When can I use 'super' and When I can not

Steven Woody narkewoody at gmail.com
Wed Jan 14 02:53:08 GMT 2009


Hi,

In the book 'Rapid GUI Programming with Python and Qt',  chapter 5,
the author said that the 'super' method won't work in an example code,
that is a override 'accept()' method, in the end of the 'accept()'
method, one need to call base class's 'accept()' method.  But if you
write the code using something like 'super(.., self).accept(self)', it
will fail, you have to rather write it as QDialog.accept(self).   But
in the same example program, in the form's __init__() method, it does
use the 'super()' method without problem.

So, my question is, in exactly what case I can not use super()?  Thanks.

-
narke


More information about the PyQt mailing list