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 675892 - missing __delitem__ implementation on treemodel
missing __delitem__ implementation on treemodel
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-11 15:48 UTC by Jose Rostagno
Modified: 2012-05-14 11:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Gtk: Implement __delitem__ on TreeModel (2.69 KB, patch)
2012-05-11 15:48 UTC, Jose Rostagno
none Details | Review

Description Jose Rostagno 2012-05-11 15:48:00 UTC
Created attachment 213875 [details] [review]
Gtk: Implement __delitem__ on TreeModel

In my old pygtk code I have the following

del self._model[iter]

In pygobject that code don't work since __delitem__ function is not implemented

Traceback (most recent call last):
  • File "/home/pepe/emesene-main/emesene/gui/gtkui/ContactList.py", line 628 in remove_contact
    del self._model[row.iter]
AttributeError: __delitem__

In the override both __getitem__ and __setitem__ are implemented so I don't see any reason to not implement __delitem__
Comment 1 Martin Pitt 2012-05-14 11:24:02 UTC
Thanks! Committed with a small whitespace fix in the comment.