On Fri, Oct 10, 2014 at 8:06 AM, Adam Jorgensen wrote: So, as I understand it, the main reason we don't have multi-line anonymous
functions is because there has been no consensus about
the syntax. Well, it's worse -- it's hard to propose a syntax that actually works
without huge changes to the way Python's parser treats indentation: inside
parentheses, indentation is currently *not* significant. I was just wondering if someone has a document detailing the various
syntaxes that have been proposed in the the past. No, but there have been many discussions. If you have a taste for mailing
list archaeology it would be nice of you could dig up the various threads
and summarize them for posterity, so at least we might make progress rather
than going around in circles.
As for myself, I have encountered a number of languages that do support
multi-line anonymous functions (Java, JavaScript, CoffeeScript) and I have
to say that for some reason they do not lead to very readable code.
Especially in the latter two, the prevalent use for anonymous functions is
for asynchronous I/O callbacks. I find Python 3.4's "yield from" as used by
the asyncio library leads to much more readable code, without he need for
callback functions at all.
--
--Guido van Rossum (python.org/~guido)