>>> def itself_and_plusone(x):
... return x, x+1
...
>>> itself_and_plusone(1)
(1, 2)
>>> (lambda x: x,x+1)(10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'x' is not defined
なぜ?ラムダの回避策は?によってではない
>>> (lambda x: (x,x+1))(10)
(10, 11)
タプル(またはリスト..)を返し、タプルを解凍する必要があるためです