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

Chris Angelico rosuav at gmail.com
Mon Nov 17 19:09:49 CET 2014


On Tue, Nov 18, 2014 at 4:40 AM, Guido van Rossum <guido at python.org> wrote:
> Wapping each result would just result in an extra allocation + deallocation
> per iteration...

Which is why I would be more inclined to use a sentinel of some
sort... but that has its own problems. There's no perfect solution, so
status quo wins unless a really compelling case can be made. I could
toss something into the Alternate Proposals section, but I wouldn't be
personally supporting it.

ChrisA


More information about the Python-ideas mailing list