[Python-ideas] Add stop=exception option to next() (was Re: PEP 479 and take())

Nick Coghlan ncoghlan at gmail.com
Sun Dec 14 16:35:43 CET 2014

On 14 December 2014 at 12:31, Guido van Rossum <guido at python.org> wrote:
> On Sat, Dec 13, 2014 at 6:08 PM, Raymond Hettinger
> <raymond.hettinger at gmail.com> wrote:
>> For Christmas, it would be a nice gift if Guido could put an end to this
>> line of thinking.   The conversations are difficult because several of the
>> participants are deeply convinced that there is something fundamentally
>> wrong with StopIteration.  I don't think any of them can easily be convinced
>> to the leave the iterator protocol alone and to continue enjoying one of our
>> best success stories.
> It ends with PEP 479. I have no intention to let this go any further. I am
> now going to mute any further threads on the topic, and I recommend you do
> the same, Raymond. Happy holidays!

Hear, hear!

For myself, I've made one last contribution to a couple of the threads
(in an attempt to convey how PEP 479 manages to make the language
*smaller* rather than larger when it comes to *writing* generator
functions). I'll monitor replies to those to see if further
clarifications may be useful, but that's specifically aimed at helping
folks to understand the design decision, rather than encouraging
further debate about it.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list