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