A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-November/137196.html below:

[Python-Dev] Please reconsider PEP 479.

[Python-Dev] Please reconsider PEP 479. [Python-Dev] Please reconsider PEP 479.Greg greg.ewing at canterbury.ac.nz
Wed Nov 26 01:58:25 CET 2014
I'm not particularly opposed to PEP 479, but the Abstract and
Rationale could do with considerable clarification. They currently
appear to promise things that are in disagreement with what the PEP
actually delivers.

The Abstract claims that the proposal will "unify the behaviour of
list comprehensions and generator expressions", but it doesn't do
that. What it actually does is provide special protection against
escaped StopIteration exceptions in one particular context (the
body of a generator). It doesn't prevent StopIteration from
escaping anywhere else, including from list comprehensions, so if
anything it actually *increases* the difference between generators
and comprehensions.

There may be merit in preventing rogue StopIterations escaping
from generators, but the PEP should sell the idea on that basis, not
on what sounds like a false promise that it will make comprehensions
and generators behave identically.

-- 
Greg

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4