added (PY-1242) Refactoring: Convert lambda to function

This commit is contained in:
Ekaterina Tuzova
2010-11-26 14:47:45 +03:00
parent 22a944fd12
commit 77358c21a5
6 changed files with 120 additions and 1 deletions
@@ -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)