[Python-Dev] Please reconsider PEP 479.

Ethan Furman ethan at stoneleaf.us
Wed Nov 26 16:34:40 CET 2014


On 11/26/2014 03:24 AM, Nick Coghlan wrote:
> 
> After thinking about that concern for a while, I'd like to suggest the
> idea of having a new builtin "allow_implicit_stop" decorator that
> swaps out a GENERATOR code object that has the new "EXPLICIT_STOP"
> flag set for one with it cleared (attempting to apply
> "allow_implicit_stop" to a normal function would be an error).

This solution is incomplete -- it's saying that if there is one guarded location, all locations must be guarded, and
that is not the case; any other call outside the try/except block has the potential to raise StopIteration.

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-dev/attachments/20141126/167e6e82/attachment.sig>


More information about the Python-Dev mailing list