Fix the lambda issues.

This commit is contained in:
Dave Halter
2017-06-05 00:22:26 +02:00
parent d1d02ba3f5
commit 3e95793756
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
#: E731:4
f = lambda x: 2 * x
while False:
#: E731:6
foo = lambda y, z: 2 * x
# Okay
f = object()
f.method = lambda: 'Method'
f = {}
f['a'] = lambda x: x ** 2
f = []
f.append(lambda x: x ** 2)
lambda: 'no-op'