Jan wrote:
Wouldn't it be easy for Python to implement generating functions so
that the iterators they return are equipped with a __reset__() method?

Use ``send``:
http://docs.python.org/whatsnew/2.5.html#pep-342-new-generator-features

Remember, there may be no underlying sequence object for
an iterator, and if you want one in that case, you should build it.

Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to