Re: [Python-Dev] Revised**8 PEP on Yield-From

2009-03-26 Thread Greg Ewing
Nick Coghlan wrote: Since correctly written generators are permitted to convert GeneratorExit to StopIteration, the 'yield from' expression should detect when that has happened and reraise the original exception. I'll have to think about that a bit, but you're probably right. it is also neces

Re: [Python-Dev] Revised**8 PEP on Yield-From

2009-03-26 Thread Guido van Rossum
On Thu, Mar 26, 2009 at 5:21 AM, Greg Ewing wrote: > Here's a new draft of the PEP. I've added a Motivation > section and removed any mention of inlining. > > There is a new expansion that incorporates recent ideas, > including the suggested handling of StopIteration raised > by a throw() call (i.

Re: [Python-Dev] Revised**8 PEP on Yield-From

2009-03-26 Thread Nick Coghlan
Greg Ewing wrote: > Here's a new draft of the PEP. I've added a Motivation > section and removed any mention of inlining. I like this version a lot better - reading the two examples on your site helped as well. > There is a new expansion that incorporates recent ideas, > including the suggested h

[Python-Dev] Revised**8 PEP on Yield-From

2009-03-26 Thread Greg Ewing
Here's a new draft of the PEP. I've added a Motivation section and removed any mention of inlining. There is a new expansion that incorporates recent ideas, including the suggested handling of StopIteration raised by a throw() call (i.e. if it wasn't the one thrown in, treat it as a return value)