[pygtk] Iterators on ListStore broken in pygtk 2.5.0 ?
finlay at moeraki.com
Sun Dec 26 06:23:32 WST 2004
Thomas Mills Hinkle wrote:
>My latest development pygtk seems to have broken iterators on ListStore.
>I'm using ubuntu hoary (read debian experimental/unstable) packages. I
>can no longer iterate over a ListStore using for row in store.
>The following code:
>print 'gtk version = ',gtk.gtk_version, 'pygtk version =
>l = gtk.ListStore(str)
>for n in range(10): l.append(["%s"%n])
>print 'ListStore ',l,' has ',len(l), ' items.'
>print "Let's try to print each item."
>for n in l: print n
>print 'We should have just printed 0 through 9...'
>Is giving me the following output:
>gtk version = (2, 6, 0) pygtk version = (2, 5, 1)
>ListStore <gtk.ListStore object (GtkListStore) at 0xb7313f54> has 10
>items. Let's try to print each item.
>We should have just printed 0 through 9...
>Any idea what's going on?
It's a bug in gtk. #162134
More information about the pygtk