After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327715 - Virtual methods should look in all bases
Virtual methods should look in all bases
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: codegen
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-19 15:14 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2008-07-16 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johan (not receiving bugmail) Dahlin 2006-01-19 15:14:49 UTC
Currently you can only override virtual methods in the current class, since the generated code does a klass.__dict__[method_name] instead of getattr(klass, method_name) which means that you can't put virtual methods in mixins or base classes.
Comment 1 Yevgen Muntyan 2006-04-30 01:07:49 UTC
It also makes impossible deep subclassing C classes, and using their methods implementation from C code, e.g. it's impossible to have C class, subclass it in python, subclass this subclass, create an instance of this grandchild class in C code, and use its methods (or impossible to use methods of intermediate class, depending on where you put gobject.type_register).
Comment 2 Yevgen Muntyan 2006-04-30 20:57:02 UTC
Sorry, my bad, it seems to be fixed in 2.10.