On 8/1/2013 10:48 AM, Alexander Shorin wrote:
I understand this, but I'm a bit confused about fate of lambdas with
such guideline since I see no more reasons to use them with p.9
statement: long lines, code duplicate, no mock and well tests etc. -
all these problems could be solved with assigning lambda to some name,
but now they are looks useless (or useful only for very trivial cases)
I do not understand most of that, but...
The guideline is not meant to cover passing a function by parameter
name. mylist.sort(key=lambda x: x[0]) is still ok. Does "Always use a
def statement instead of assigning a lambda expression to a name." need
'in an assignment statement' added?
--
Terry Jan Reedy
_______________________________________________
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