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/2004-May/044640.html below:

[Python-Dev] PEP 289 - Generator Expressions

[Python-Dev] PEP 289 - Generator Expressions - Let's Move Forward [Python-Dev] PEP 289 - Generator Expressions - Let's Move ForwardGuido van Rossum guido at python.org
Mon May 3 00:08:35 EDT 2004
> Armin Rigo <arigo at tunes.org>:
> 
> > Early binding is closer to the idea that turning a listcomp into a
> > genexprs should just work if you only iterate once on the result.

Greg Ewing:
> I'm not sure that's an idea we should be promulgating in the first
> place. The original motivation for generator expressions was things
> like
> 
>   total = sum(x**2 for x in stuff)
> 
> where not only will the sequence be used just once, but it will be
> used *immediately* before doing anything else.
> 
> Those are the use cases we need to advertise this as targeting, I
> think, not "any listcomp that's only used once".

Right -- thanks for saying it so clearly!  Early binding seems to be
trying to solve a problem with a use for genexprs that's questionable
at best.

--Guido van Rossum (home page: http://www.python.org/~guido/)

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