<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>The tutorial about Lambda forms(Documentation->The Python Tutorial->4.7.5 Lambda Forms) currently assumes a prior knowledge of functional programming paradigm. I wanted to propose a change to that. It can be made better by adding some common sense things to the explanation so the simple examples given don't overwhelm the first-time reader due to unfamiliarity with functional programming. The following could take care of the problem.<br></span></div>------------------<br>By popular demand, a few features commonly found in functional programming
languages like Lisp have been added to Python. With the <a class="reference internal" href="http://docs.python.org/2/reference/expressions.html#lambda"><tt class="xref std std-keyword docutils literal"><span class="pre">lambda</span></tt></a>
keyword, small anonymous functions can be created. <br><br>Here’s a function that
returns the sum of its two arguments: <tt class="docutils literal"><span class="pre">lambda</span> <span class="pre">a,</span> <span class="pre">b:</span> <span class="pre">a+b</span></tt>. Here the comma separated variables between the lambda and the colon are the function's arguments and the part after the colon is the return type of the anonymous function.<br><br>Lambda forms can be
used wherever function objects are required. They are syntactically restricted
to a single expression. Semantically, they are just syntactic sugar for a
normal function definition. Like nested function definitions, lambda forms can
reference variables from the containing scope:<br><br>//The Code will be here.<br>------------------<br>Additionally adding the link to functional programming HowTO in the first sentence "commonly found in functional programming
languages" can help the first-time reader and those unfamiliar with functional paradigm to get acquainted with functional programming in Python's context.<br><br>If someone reads it can someone send a reply to this about where this mailing list can be browsed. I sent a previous one also but wasn't able to follow through because I didn't know where to browse this mailing list.<br><div> </div><div>Aseem Bansal<br>(aseembansal at ymail)<br>(asmbansal2 at gmail)<br></div></div></body></html>