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

[Python-Dev] Re: accumulator display syntax

[Python-Dev] Re: accumulator display syntax [Python-Dev] Re: accumulator display syntaxPaul Moore pf_moore at yahoo.co.uk
Sat Oct 18 09:18:30 EDT 2003
"Phillip J. Eby" <pje at telecommunity.com> writes:

> Which of course means there'd be little need for imap and ifilter,
> just as there's now little need for map and filter.
>
> Anyway, if you look at '.. for .. in .. [if ..]' as a ternary or
> quaternary operator on an iterator (or iterable) that returns an
> iterator, it makes a lot more sense than thinking of it as having
> anything to do with generator(s).  (Even if it might be implemented
> that way.)

I've reached the point of skimming this discussion, but this struck a
chord. I think the original proposal (for special syntax for
accumulators) is too limited, and if anything is needed (not clear on
that) it should be a generalised iterator comprehension construct.

In that context, it seems to me that iterator comprehensions bear a
very similar relationship to imap/ifilter to the relationship between
map/filter and list comprehensions.

Paul.
-- 
This signature intentionally left blank


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