On Sun, Feb 25, 2018 at 6:36 AM, Serhiy Storchaka <storchaka@gmail.com> wrote:
23.02.18 19:30, Guido van Rossum пише:
I'm not saying anything new here, but since you asked specifically for my opinion: I don't care for the idiom; it's never occurred to me before, and it smells of cleverness. If I saw it in a code review I would probably ask for a regular for-loop to make the code more maintainable.

But if you say it's useful for some class of users and it would be more useful if it was faster, I'm fine with the optimization. The optimization is also clever, and here I appreciate cleverness!

Thank you. Given the contradictory relation of other core developers to this idiom, and small total effect of this optimization (since the problem solved by using this idiom is rarely occurred), I'm inclined to defer this optimization on to some time (months or years). Maybe something will be changed during this period: either this idiom will become more popular, or new arguments against using it will be found, or better solution will be found, or this optimization will become the part of more general optimization.

Yeah, it doesn't seem there's any hurry. Opinions on the idiom are definitely, um, divided. :-)

FWIW I don't care much about the 'f(x) as y' solution either, and being new syntax it has a much higher bar.

--
--Guido van Rossum (python.org/~guido)