Logged In: YES
user_id=1038590
In for a penny, in for a pound. The new patch adds support for iterator
concatenation (PyIter_Concat) and iterator repetition (PyIter_Repeat),
based on itertools.chain and itertools.cycle respectively.
The latter required adding an optional "times" argument to
itertools.cycle.
Augmented assignment is not supported in this patch.
I also tweaked the behaviour of PyIter_GetItem, so its error handling
was more like that of PySequence_GetItem.
Finally, added a trivial test script that is barely deserving of the name,
but does show that the thing basically works.
Further work (i.e. proper tests. documentation, and cleaning up the
code) will be dependent on BDFL approval.
|