Samuel Li wrote:
.attribute -> lambda x: x.attribute

.method(*args, **kwargs) -> lambda x: x.method(*args, **kwargs)

Leading dots can be hard to spot when reading code.

Also, I'm not convinced that use cases for this are frequent enough
to warrant new syntax.

Something akin to this can already be done in simple cases:

   map(string.upper, some_list)

Anything more complicated, such as passing arguments, is probably
better expressed with a comprehension.

--
Greg
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to