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/2002-June/025971.html below:

[Python-Dev] List comprehensions

[Python-Dev] List comprehensions [Python-Dev] List comprehensionsTim Peters tim.one@comcast.net
Wed, 26 Jun 2002 19:29:42 -0400
[Gerald S. Williams, on listcomp (non)scopes]
> No problem. As long as it was decided that there's a use for
> the current behavior, I won't question it.

I'm not sure there's a use for it, but I am sure I'd shoot any coworker who
found one and relied on it <wink>.  Python didn't have lexical scoping at
the time listcomps were getting hammered out, and it would have been nuts to
introduce a "local scope" for a single, isolated construct.  Then and now,
the semantics of listcomps can be exactly explained via a straightforward
transformation to a for-loop.  Now that we have lexical scoping, a local
index vrbl would also be easy to explain -- but it would be "a change".





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