pygobject / pgi

[Unmaintained: Use PyGObject instead] GTK+ / GObject Introspection Bindings for PyPy.
GNU Lesser General Public License v2.1
74 stars 16 forks source link

Arguments to constructor work as keywords only #17

Closed stuaxo closed 9 years ago

stuaxo commented 9 years ago

Narrowed down a constructor issue I had a while back :)

Arguments in constructor work as keyword args, but not as positional arguments:

# Works in gi.repository and pgi
adj = Gtk.Adjustment(v.value, v.min, v.max, .1, 2, 1)
Gtk.HScale(adjustment=adj)
# Doesn't work in pgi
adj = Gtk.Adjustment(v.value, v.min, v.max, .1, 2, 1)
Gtk.HScale(adj)
lazka commented 9 years ago

Thanks.

I can't reproduce; I get this with gi:

>>> adj = Gtk.Adjustment(1, 1, 1, .1, 2, 1)
>>> Gtk.HScale(adj)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)
stuaxo commented 9 years ago

Doh! You're right, sorry for the noise !