wp_core_connect() conflicts with Python GObject bindings
I was playing around with the Python GObject bindings which result in a name clash for .connect()
.
#!/usr/bin/env python
import gi
gi.require_version("Wp", "0.4")
from gi.repository import Wp
from gi.repository import GObject
from gi.repository import GLib
Wp.init(Wp.InitFlags.ALL)
wp = Wp.Core()
# Try to connect to signal, but this clashes with wp_core_connect()
wp.connect("connected", lambda core : print(f"{core}"))
# Workaround
# GObject.Object.connect(wp, "connected", lambda core : print(f"{core}"))
wp.connect()
GLib.MainLoop().run()
Python exports g_signal_connect()
as foo.connect()
which clashes with wp_core_connect()
which is also assigned to connect()
.
Based on the Gjs tutorial I expect the javascript bindings to have the same problem, as does Vala.
Ruby (signal_connect
) and Haskell (connectSignal
) seem to be fine based on a quick skim of the documentation).
Not sure whether this is worth fixing given it'd be an API break but anyway, FYI.