mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
added (PY-1242) Refactoring: Convert lambda to function
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
def func(seq):
|
||||
def function(x, y):
|
||||
return (x + y) / y
|
||||
|
||||
newlist = reduce(function
|
||||
, seq)
|
||||
@@ -0,0 +1,2 @@
|
||||
def func(seq):
|
||||
newlist = reduce(lambda x<caret>, y: (x+y)/y, seq)
|
||||
Reference in New Issue
Block a user