On 02/08/13 06:52, Alexander Belopolsky wrote:
On Thu, Aug 1, 2013 at 4:29 PM, Terry Reedy <tjre...@udel.edu> wrote:

def f(x): return 2*x
f = lambda x: 2*x


Am I the only one who finds the second line above much more readable than
the first?  The def statement is not intended to be written in one line.
  The readability suffers because the argument is separated from the value
expression by return keyword.

You are not the only one.

I will continue to write "f = lambda ..." at the interactive interpreter 
without shame, although I rarely (never?) use it in code.


--
Steven
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to