Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Nick Coghlan
On 20 November 2014 06:48, MRAB pyt...@mrabarnett.plus.com wrote: On 2014-11-19 20:10, Guido van Rossum wrote: There's a new PEP proposing to change how to treat StopIteration bubbling up out of a generator frame (not caused by a return from the frame). The proposal is to replace such a

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Nick Coghlan
On 20 November 2014 06:15, Benjamin Peterson benja...@python.org wrote: On Wed, Nov 19, 2014, at 15:10, Guido van Rossum wrote: There's a new PEP proposing to change how to treat StopIteration bubbling up out of a generator frame (not caused by a return from the frame). The proposal is to

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Guido van Rossum
I've made some updates to the PEP: - added 19-Nov-2014 to Post-History - removed implicitly-raised from the abstract - changed the __future__ thing to generator_return - added a clarifying paragraph that Chris added to his own draft - added a link to http://bugs.python.org/issue22906 which has a

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Antoine Pitrou
On Thu, 20 Nov 2014 11:36:54 -0800 Guido van Rossum gu...@python.org wrote: I've made some updates to the PEP: - added 19-Nov-2014 to Post-History - removed implicitly-raised from the abstract - changed the __future__ thing to generator_return To me generator_return sounds like the addition

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Serhiy Storchaka
On 20.11.14 21:58, Antoine Pitrou wrote: To me generator_return sounds like the addition to generator syntax allowing for return statements (which was done as part of the yield from PEP). How about generate_escape? Or may be generator_stop_iteration?

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Guido van Rossum
On Thu, Nov 20, 2014 at 12:13 PM, Serhiy Storchaka storch...@gmail.com wrote: On 20.11.14 21:58, Antoine Pitrou wrote: To me generator_return sounds like the addition to generator syntax allowing for return statements (which was done as part of the yield from PEP). How about generate_escape?

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Terry Reedy
On 11/20/2014 5:04 PM, Guido van Rossum wrote: On Thu, Nov 20, 2014 at 12:13 PM, Serhiy Storchaka storch...@gmail.com mailto:storch...@gmail.com wrote: On 20.11.14 21:58, Antoine Pitrou wrote: To me generator_return sounds like the addition to generator syntax

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Antoine Pitrou
On Thu, 20 Nov 2014 14:04:24 -0800 Guido van Rossum gu...@python.org wrote: On Thu, Nov 20, 2014 at 12:13 PM, Serhiy Storchaka storch...@gmail.com wrote: On 20.11.14 21:58, Antoine Pitrou wrote: To me generator_return sounds like the addition to generator syntax allowing for return

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Terry Reedy
On 11/20/2014 2:36 PM, Guido van Rossum wrote: There's still a lively discussion on python-ideas; Steven D'Aprano has dug up quite a bit of evidence that StopIteration is used quite a bit in ways that will break under the new behavior, and there also seems to be quite a bit of third-party

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 6:36 AM, Guido van Rossum gu...@python.org wrote: It would also be useful if we could extend the PEP with some examples of the various categories of fixes that can be applied easily, e.g. a few examples of raise StopIteration directly in a generator that can be replaced

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 9:04 AM, Guido van Rossum gu...@python.org wrote: On Thu, Nov 20, 2014 at 12:13 PM, Serhiy Storchaka storch...@gmail.com wrote: On 20.11.14 21:58, Antoine Pitrou wrote: To me generator_return sounds like the addition to generator syntax allowing for return statements

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Guido van Rossum
On Thu, Nov 20, 2014 at 3:13 PM, Antoine Pitrou solip...@pitrou.net wrote: On Thu, 20 Nov 2014 14:04:24 -0800 Guido van Rossum gu...@python.org wrote: On Thu, Nov 20, 2014 at 12:13 PM, Serhiy Storchaka storch...@gmail.com wrote: On 20.11.14 21:58, Antoine Pitrou wrote: To me

Re: [Python-Dev] PEP 479: Change StopIteration handling inside generators

2014-11-20 Thread Chris Angelico
On Fri, Nov 21, 2014 at 10:34 AM, Chris Angelico ros...@gmail.com wrote: On Fri, Nov 21, 2014 at 6:36 AM, Guido van Rossum gu...@python.org wrote: It would also be useful if we could extend the PEP with some examples of the various categories of fixes that can be applied easily, e.g. a few