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/2009-January/085195.html below:

Add a "while" clause to generator expressions

[Python-Dev] PEP 3142: Add a "while" clause to generator expressions [Python-Dev] PEP 3142: Add a "while" clause to generator expressionsNick Coghlan ncoghlan at gmail.com
Mon Jan 19 21:41:18 CET 2009
Steven Bethard wrote:
> -1. As I pointed out on python-ideas, this proposal makes "while" mean
> something different in a generator expression.

While I initially found the suggestion in the PEP rather cute, that
isn't enough to make it a good idea as a language addition.

So, -1 for a few reasons:
- the 'idiom' being replaced isn't common enough to justify dedicated syntax
- the proposed syntax change isn't significantly easier to understand or
significantly faster than the existing alternatives
- Steven's more substantial objection that it would break the parallel
between generator expressions/list comprehensions and the corresponding
statements.

Cheers,
Nick.

P.S. Some examples of past syntax changes that *were* accepted (and why):
http://mail.python.org/pipermail/python-dev/2008-October/082831.html

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
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