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

[Python-Dev] Re: decorate-sort-undecorate

[Python-Dev] Re: decorate-sort-undecorateDavid Eppstein eppstein at ics.uci.edu
Wed Oct 15 22:58:34 EDT 2003
In article <A48AAE39.E892B3A at mail.google.com>,
 Peter Norvig <pnorvig at google.com> wrote:

> As it turns out, I have a proposed syntax for something I call an
> "accumulation display", and with it I was able to implement and test a
> SortBy in about a minute.  It uses the syntax
> 
> >>> [SortBy: abs(x) for x in (-2, -4, 3, 1)]
> [1, -2, 3, -4]
> 
> where SortBy is an expression (in this case an identifier bound to a
> class object), not a keyword.
...
> You can read the whole proposal at http:///www.norvig.com/pyacc.html

Would this proposal also allow [Yield: expr(x) for x in someiterator] ?

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science


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