Parameter passing in python

Laura Creighton lac at cd.chalmers.se
Thu May 31 10:47:06 EDT 2001


(posted by me, but this is from all of us here .... )

---------------------------------------
This is what I have to do in my code when inheriting widgets:

import Pmw

class MyButtonBox(Pmw.ButtonBox)
    def __init__(self, parent, **kw):
       ...
        apply(Pmw.ButtonBox.__init__, (self, parent), kw)

Why am I required to do apply to be able to pass the keyword list?
Some model of Pmw.ButtonBox.__init__(self, args) would be
more readable.

Laura




More information about the Python-list mailing list