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 105514 - properties should be attributes on objects
properties should be attributes on objects
Status: RESOLVED DUPLICATE of bug 81879
Product: pygtk
Classification: Bindings
Component: general
1.99.x/2.0.x
Other Mac OS
: Normal normal
: ---
Assigned To: Python bindings maintainers
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2003-02-07 19:03 UTC by Joe Shaw
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0



Description Joe Shaw 2003-02-07 19:03:52 UTC
Properties (like "sensitive" on GtkWidget) should be attributes in pygtk,
so you can easily do "widget.sensitive".

the getattr() method for PyGObjects should probably call get_property() on
the object before giving up.
Comment 1 Johan (not receiving bugmail) Dahlin 2003-02-10 20:08:39 UTC
What do you say about modifying __getitem__ instead?

So we have:

widget['sensitive'] = False
print button['label'] 

Acceptable?
Comment 2 James Henstridge 2003-02-11 00:11:47 UTC
This is a duplicate of another bug I filed.  If we do this, I would
prefer to do it with descriptors if possible.

*** This bug has been marked as a duplicate of 81879 ***