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 734894 - Support GObject property access as direct Python object attributes
Support GObject property access as direct Python object attributes
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-16 03:06 UTC by Simon Feltman
Modified: 2018-01-10 20:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon Feltman 2014-08-16 03:06:20 UTC
The request for accessing GObject properties directly has come up a few times. Furthermore, both vala and gjs support direct property accessors as follows:


button = Gtk.Button()
button.label

vs.

button.props.label


Implementing this should be trivial in the sense that we just need to implement __getattr__ and __setattr__ which could be done purely in Python and return the results of get/set_property() with TypeError exceptions translated to AttributeErrors.
Comment 1 GNOME Infrastructure Team 2018-01-10 20:44:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/77.