Possible to fake object type?
Chris Liechti
cliechti at gmx.net
Sat Mar 2 10:11:02 EST 2002
Michael 'Mickey' Lauer <mickey at tm.informatik.uni-frankfurt.de> wrote
in
news:3c80e76b at nntp.server.uni-frankfurt.de:
> So: Is it possible to fake the type of a class or
> is it possible to magically override the method call "bouncing"
> to the base class ?
you can allways call the methods of on e of the supperclasses by
using:
Baseclass.method(self, args, ...)
it's the same you do in __init__ to initilaize base classes:
class Dockable(gtk.HandleBox):
def __init__(self):
gtk.HandleBox.__init__(self)
def dosomething(self, arg):
print "calling dosomething...",
result = gtk.HandleBox.dosomething(self, arg)
print "result = %r" % result
return result
...
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list