[issue16150] Implement generator interface in itertools.chain.

2012-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: In the python-ideas thread, "Propagating StopIteration value", Guido further elaborated "But that just seems to perpetuate the idea that you have, which IMO is wrongheaded. Itertools is for iterators, and all the extra generator features make no sense for it."

[issue16150] Implement generator interface in itertools.chain.

2012-10-08 Thread Nick Coghlan
Nick Coghlan added the comment: As discussed on python-ideas: the iterator interface is narrower than the generator interface. Tools for working with iterators are *expected* to lose the generator specific details, just as for loops do, especially when they deal with multiple iterators. When

[issue16150] Implement generator interface in itertools.chain.

2012-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: I am going to reject this unless at least one other core developer supports it. Extensive discussion on python-ideas has found very few supporters besides Serhiy Storchaka. -- ___ Python tracker

[issue16150] Implement generator interface in itertools.chain.

2012-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: I also don't think that this is a desirable feature. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue16150] Implement generator interface in itertools.chain.

2012-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: TBH I don't think that using "yield from" in the docs makes things clearer at all -- it just requires readers to understand a rather esoteric feature. -- nosy: +gvanrossum ___ Python tracker

[issue16150] Implement generator interface in itertools.chain.

2012-10-07 Thread pyos
Changes by pyos : Removed file: http://bugs.python.org/file27455/itertools-chain-send-throw-and-close.diff ___ Python tracker ___ ___ Python-

[issue16150] Implement generator interface in itertools.chain.

2012-10-07 Thread pyos
pyos added the comment: Updated the patch. Thanks Serhiy Storchaka for comments on the previous one. -- Added file: http://bugs.python.org/file27468/itertools-chain-send-throw-and-close-2.diff ___ Python tracker _

[issue16150] Implement generator interface in itertools.chain.

2012-10-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue16150] Implement generator interface in itertools.chain.

2012-10-06 Thread pyos
Changes by pyos : Added file: http://bugs.python.org/file27456/itertools-chain-doc.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue16150] Implement generator interface in itertools.chain.

2012-10-06 Thread pyos
Changes by pyos : -- versions: -Python 3.3, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue16150] Implement generator interface in itertools.chain.

2012-10-06 Thread pyos
Changes by pyos : -- versions: +Python 3.3, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue16150] Implement generator interface in itertools.chain.

2012-10-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ncoghlan stage: -> patch review type: -> enhancement versions: -Python 3.3, Python 3.5 ___ Python tracker ___ ___

[issue16150] Implement generator interface in itertools.chain.

2012-10-06 Thread pyos
New submission from pyos: Since "yield from" made it into Python 3.3, I think it would be useful to chain multiple generators and still get a generator, not an iterator. That is, the following code: def f(): yield from itertools.chain(A, B, C) should be (at least roughly) equivalent to d