Hi,
As far as I know, GObject does not support multiple inheritance.
Strangely enough, the following code for some reason works in
PyGObject up to 2.26:
import gobject
class A(gobject.GObject):
pass
class B(gobject.GObject):
__gsignals__ = {
'b': (gobject.SIGNAL_RUN_LAST, None, ()),
}
class C(A, B):
pass
c = C()
c.connect('b', lambda *x: None)
print "OK"
However, the same code produces an error in the development version of
PyGObject.
Traceback (most recent call last):
File "gobject-multi-inherit.py", line 15, in <module>
c.connect('b', lambda *x: None)
TypeError: <C object at 0xb754989c (__main__+C at 0x8834200)>:
unknown signal name: b
This was reported to occur on Ubuntu natty, whose python-gobject
package is at version 2.27.0+git20110131-0ubuntu6. See
https://bugs.launchpad.net/bugs/714484
My question is: was this meant to work in the first place? Should I
assume that the new behaviour is how future releases will react?
Thanks,
Johannes
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/