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/2003-October/038865.html below:

[Python-Dev] accumulator display syntax

[Python-Dev] accumulator display syntax [Python-Dev] accumulator display syntaxNeil Schemenauer nas-python at python.ca
Fri Oct 17 12:57:54 EDT 2003
On Fri, Oct 17, 2003 at 09:10:45AM -0700, Guido van Rossum wrote:
> > (yield x*2 for x in foo)
> > 
> > or maybe:
> > 
> > (yield: x*2 for x in foo)
> 
> Both look decent to me, and in fact the first is what I was thinking
> of this morning in the shower. :-)

So would you write:

    sum(yield: x*2 for x in foo)

or

    sum((yield: x*2 for x in foo))

At the moment I like the latter better.

  Neil

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