Stop writing lambda expressions in Python
all i could think of is &quot;stop writing python&quot;. it seems to me that a lot of these problems are fundamental problems with python. i continue to not understand why anybody likes python the language.<p>the fact that creating a function with lambda versus the normal way is different is bonkers. for example, in f# (and other sane languages), the following are identical:<p><pre><code>  let test1 = fun x -&gt; x * x

  let test2 x = x * x
</code></pre>
both return:<p><pre><code>  x:int -&gt; int
</code></pre>
are they really different in python or is it just a weird naming problem? the article isn&#x27;t explicit on the actual differences other than what is reported by the REPL.<p>also, you can&#x27;t pass operators as functions in python? in f#, you simply wrap them in parentheses.<p><pre><code>  let test3 f x y = f x y

  &gt; test3 (*) 2 3 ;;

  val it : int = 6
</code></pre>
i read an interview with hal abelson where he called python&#x27;s lambda broken. seems so.<p>edit: also, this guy&#x27;s thoughts on map and filter, in my opinion, show the python community&#x27;s backwoods thinking regarding functional programming. yes, it seems generator expressions are nice (they are called sequence expressions in f#), but map and filter, even for his simple examples are much more clear. they communicate better what is actually happening. the fact that he never uses map and filter at all and then goes on to basically say map and filter aren&#x27;t even needed in python says a lot.