multiple constructor __init__
Emmanuel Mayssat
emayssat at gmail.com
Thu Feb 2 20:09:15 EST 2012
Hello all,
I would like to instantiate my class as follow
QObject(<param1>, <parent>)
QObject(<parent>)
an example would be
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qmenu.html
How can I do this without have to specify parent=<parent> in the second
version
(I always need to supply the parent parameter, but I would like to supply
it last)
I have read this
http://stackoverflow.com/questions/356718/how-to-handle-constructors-or-methods-with-a-different-set-or-type-of-argument
but all the suggested methods do not work as I want
Any idea?
--
Emmanuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120202/3ceab89b/attachment.html>
More information about the Python-list
mailing list