Vedran Čačić <ved...@gmail.com> added the comment:

Mapping lambdas is always inferior to comprehensions, in fact the main reason 
comprehensions were introduced was that mapping lambdas was cumbersome. (It 
didn't work so well for filtering by lambdas, but that's another story.)

As I said, Py3K was beneficial since raw maps weren't eager anymore, but it 
also gave us a print_function, enabling the new antipattern

    [print(obj) for obj in mylist]

which wasn't possible before.

It's too late for Python, but a lesson for some future programming language: 
procedures and functions are not the same. Function call is an expression 
having a value, procedure call is a statement having an effect. Both are 
useful, but conflating them is not.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40342>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to