<div dir="ltr"><div>[Chris Angelico] </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Though... it's insignificant when the function header precedes the<br>expression/body. With the proposal to move the header to the end, that<br>might become problematic, which makes it yet another cost to the<br>proposal.</blockquote><div><br>I don't think it would be a problem because, like ternary and other circuiting operations, the expression isn't evaluated until certain criteria are met.<br>The arrangement shouldn't matter.<br><br>...I think.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 21, 2018 at 10:10 PM Chris Angelico <<a href="mailto:rosuav@gmail.com">rosuav@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Aug 22, 2018 at 12:57 PM, Abe Dillon <<a href="mailto:abedillon@gmail.com" target="_blank">abedillon@gmail.com</a>> wrote:<br>
> [Chris Angelico]<br>
>><br>
>> If you have a use-case for a lambda function that takes a callback and<br>
>> has a default value for that callback, please submit it to The Daily<br>
>> WTF. In Steve's example, the main function was created with a<br>
>> statement.<br>
><br>
><br>
> Fair enough, but I still think D'Aprano may have engineered his example to<br>
> be particularly unreadable.<br>
> Why would you use 'arg' for both the argument to the method and the<br>
> callback! That's at least a little WTF.<br>
<br>
True, but hardly significant. The one inside lambda is local to it.<br>
<br>
Though... it's insignificant when the function header precedes the<br>
expression/body. With the proposal to move the header to the end, that<br>
might become problematic, which makes it yet another cost to the<br>
proposal.<br>
<br>
ChrisA<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div>