I just wanted to ask if some version of PyQt will support iterators for Listboxes, Listviews etc. through generator functions or the __iter__ protocol? I know both are Python 2.2+ specific, but are there any plans to implement them, Phil? Is anybody of you interested in having them? A simple iterator for a QListBox using generators would look like this (works only with Python 2.2 or greater):
from __future__ import generators # python2.2 only
def ListBoxIterator(listbox):
item = listbox.firstItem()
while item:
yield item
item = item.next()
return # no special need to do thisDon't know about generators yet? Read http://www.python.org/doc/2.3a2/whatsnew/section-generators.html
to get a fast intro.
Greetings,
Torsten
pgp00000.pgp
Description: PGP signature
