Stefan Pochmann writes:
> Steven D'Aprano wrote:
> > Or simpler still:
>
> Yes, I didn't try to make it "simpler", but intentionally kept the
> transformations as-is.
But you didn't, really. As-is would use genexps to "inline" the map
and filter calls:
list(x for x in (y + 1 for y in [1, 2, 3]) if x % 2 == 0)
which in this case is much harder to get wrong, and still reads as
well as, if not better than, the original "chained methods of dataflow
object" idiom. Sure, it's a little verbose, but I think it's time for
proponents to find persuasive examples, preferably not having nice
genexp implementations (and in the stdlib).
I don't recall if Steven said or I'm inferring that he'd like the
whole proposal better if there were a persuasive "pipeline" syntax
proposal with it, but that's where I am. I don't find "method
chaining as pipeline" to be an attractive syntax. That's a big IMO
FYI, of course YMMV.
Yet another Steve
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/LSJL6IG5J23B45BLUCE2T3JIMFEK7XPM/
Code of Conduct: http://python.org/psf/codeofconduct/