title: Python short circuit with a lambda expression raises syntax error
body: <p>I wanted to return a lambda expression from a function if the argument to the function fulfills some criteria. I thought by writing something like the following this can be done:</p>
  <pre class="lang-py prettyprint-override"><code>def f(x=None):
      return x or lambda:True    
  f()
  </code></pre>
  <p>but the call raises a syntax error! Saving the lambda in a lexical variable does the work, but I am curious why is it not possible to write the expression above?</p>