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~
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com