[Python-ideas] An alternative to PEP 572's Statement-Local Name Bindings
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Mar 3 19:51:24 EST 2018
> 2018-03-03 8:40 GMT+01:00 Nick Coghlan <ncoghlan at gmail.com>:
>> pairs = [(f(y), g(y)) for x in things with bind(h(x)) as y]
I don't mucn like "with bind(h(x)) as y" because it's kind of
like an abstraction inversion -- you're building something
complicated on top of something complicated in order to get
something simple, instead of just having the simple thing
to begin with. If nothing else, it has a huge runtime cost
for the benefit it gives.
--
Greg
More information about the Python-ideas
mailing list