title: Get lambda function's name as string
body: <p>How can I get a lambda function's name?</p>
  
  <p>Using the <code>__name__</code> property returns <code>&lt;lambda&gt;</code>:</p>
  
  <pre><code>def myfunc():
      pass
  myfunc_l = lambda :None
  
  print myfunc.__name__
  print myfunc_l.__name__
  
  &gt;&gt;myfunc
  &gt;&gt;&lt;lambda&gt;
  </code></pre>
  
  <p>I was expecting <code>myfunc_l</code> but I got <code>&lt;lambda&gt;</code></p>