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

[Python-Dev] Please Vote -- Generator Comprehensions

[Python-Dev] Please Vote -- Generator Comprehensions [Python-Dev] Please Vote -- Generator ComprehensionsMartin v. Loewis martin@v.loewis.de
07 Mar 2002 09:09:17 +0100
"Samuele Pedroni" <pedroni@inf.ethz.ch> writes:

> 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.

In turn, the bytecode for this will involve another code object, as
well as a MAKE_FUNCTION execution, cell objects, and the like. My gut
feeling is that many people will be surprised by the poor performance
of generator comprehension, compared to list comprehension. They also
might be surprised when they get cyclic garbage they didn't expect,
but I'm not sure under what circumstances this might happen.

Regards,
Martin






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