info: Show which type/object callables are bound to
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
print(Gtk.Window.do_get_preferred_width)
print(Gtk.Widget.do_get_preferred_width)
w = Gtk.Window()
print(super(Gtk.Window, w))
print(super(Gtk.Window, w).do_get_preferred_width)
Gtk.Window.do_get_preferred_width(w)
With patch prints:
gi.VFuncInfo(get_preferred_width, bound=<GType GtkWindow (94666225146464)>)
gi.VFuncInfo(get_preferred_width, bound=<GType GtkWidget (94666225176160)>)
<super: <class 'Window'>, <Window object>>
gi.VFuncInfo(get_preferred_width, bound=<GType GtkWindow (94666225146464)>)
Without:
gi.VFuncInfo(get_preferred_width)
gi.VFuncInfo(get_preferred_width)
<super: <class 'Window'>, <Window object>>
gi.VFuncInfo(get_preferred_width)
Edited by Christoph Reiter