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-March/020687.html below:

[Python-Dev] Please Vote -- Generator Comprehensions

[Python-Dev] Please Vote -- Generator Comprehensions [Python-Dev] Please Vote -- Generator ComprehensionsSamuele Pedroni pedroni@inf.ethz.ch
Thu, 7 Mar 2002 08:10:09 +0100
From: Martin v. Loewis <martin@v.loewis.de>
> "Raymond Hettinger" <python@rcn.com> writes:
> 
> > Before I send generator comprehension portion to Guido for
> > pronouncement, I would like to get all of your votes +1 or -1 on
> > just the part about Generator Comprehensions.
> 
> +0. I'd like to see an implementation strategy first. Notice that the
> strategy for list comprehension does *not* apply: it is not lazy.
> 

Hypothesis:

Given that a frame, new scope and nested scope semantics
is required the rewriting as a generator is probably the strategy,
although I don't know whether the CPython internal syntax trees
allow for a direct rewriting strategy.

Otherwise code that handles the syntax as if it was
the rewritten generator is needed, in order to the deal
both for the pass that gathers nested scope
information and for the pass that generates the code.

regards, Samuele Pedroni.




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