<p dir="ltr"><br>
On 11 Oct 2014 04:44, "Guido van Rossum" <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>
><br>
> On Fri, Oct 10, 2014 at 8:06 AM, Adam Jorgensen <<a href="mailto:adam.jorgensen.za@gmail.com">adam.jorgensen.za@gmail.com</a>> wrote:<br>
>><br>
>><br>
>> So, as I understand it, the main reason we don't have multi-line anonymous functions is because there has been no consensus about <br>
>> the syntax.<br>
><br>
><br>
> 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.<br>
>  <br>
>><br>
>> I was just wondering if someone has a document detailing the various syntaxes that have been proposed in the the past.<br>
><br>
><br>
> 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.</p>
<p dir="ltr">There's also my 3 different documented suggestions aimed at this problem space:</p>
<p dir="ltr">PEP 403 (overriding the name binding step for function and class definitions): <a href="http://www.python.org/dev/peps/pep-0403/">http://www.python.org/dev/peps/pep-0403/</a></p>
<p dir="ltr">PEP 3150 (forward references to a trailing statement local namespace): <a href="http://www.python.org/dev/peps/pep-3150/">http://www.python.org/dev/peps/pep-3150/</a></p>
<p dir="ltr">Suite expressions: <a href="http://python-notes.curiousefficiency.org/en/latest/pep_ideas/suite_expr.html">http://python-notes.curiousefficiency.org/en/latest/pep_ideas/suite_expr.html</a></p>
<p dir="ltr">The main stumbling block for all of them isn't getting agreement on syntax as such, but rather finding compelling examples that can't already be written more clearly by refactoring them to remove the need for a multi-line inline function. I don't have such examples myself, which is why both PEPs are deferred, and the last idea was never even submitted in the first place.</p>
<p dir="ltr">Without such compelling examples, it's hard to judge the value of the syntax proposals themselves, as it's difficult to counter the "well, don't write it like that" argument.</p>
<p dir="ltr">I asked various folks at SciPy earlier this year to look into coming up with such examples (as that was one of the best aspects of the matrix multiplication PEP), but haven't heard anything back as yet.</p>
<p dir="ltr">Regards,<br>
Nick.</p>