<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 4:54 PM, Ben Gift <span dir="ltr"><<a href="mailto:benhgift@gmail.com" target="_blank">benhgift@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It would be more pythonic to use an empty def call instead. </blockquote></div><br>No, it won't. Python draws a very strong distinction between expressions and statements. This line has been blurred somewhat with the advent of comprehensions and the if-else expression, but it would still require more benefit than three characters in a keyword saving to allow def use in both statements and expressions.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">The following, for example, does not look pythonic at all:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><b>def</b> transform(<i>seq</i>, <i>func</i>=<b>def</b>(<i>x</i>):<i>x</i>):</div>
<div class="gmail_extra"> ...</div><div class="gmail_extra"><br></div><div class="gmail_extra">(Note that I attempted to emulate syntax highlighting to make my point.)</div></div>