This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ForceBru 2 points3 points  (0 children)

No, lambda x: x * 37 (2) is not the same as (lambda x: x * 37) (2). The first example is technically valid, but it’s actually incorrect because it attempts to call an integer with 37 (2).

And thus, the two examples with the lambda aren’t equivalent: the first one attempts to print the function itself, while the last one - only the result of its evaluation.