GNOME Bugzilla – Bug 679199
Fix the return of the length of a TreePath
Last modified: 2012-07-04 08:56:53 UTC
The length of a TreePath includes the separators, instead of being the length of the elements tuple.
Created attachment 217734 [details] [review] overrides: Fixed the return of the length of a TreePath The length of a TreePath currently is the length of the string including the separator character ':'. It should be the number of elements of the path.
Out of interest, how do you get the wrong value? You cannot currently call len() on a Gtk.TreePath object at all.
Thanks! I used the already existing get_depth() API instead and added tests: http://git.gnome.org/browse/pygobject/commit/?id=0ddfecf3bf0a5d7893cd02cff41503d810ef6ce8
Thank you!