Issue 1458903: lambda with a parenthesized argument raises TypeError (original) (raw)
================================================== falsetru@lj-lw20 ~ $ python2.5 Python 2.5a0 (trunk:43324, Mar 26 2006, 14🔞23) [GCC 3.4.5 (Gentoo 3.4.5, ssp-3.4.5-1.0, pie-8.7.9)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
(lambda(x): x)(1) Traceback (most recent call last): File "", line 1, in File "", line 1, in TypeError: unpack non-sequence (lambda(x): x)((1,)) 1 (lambda(x): x)((1,2)) Traceback (most recent call last): File "", line 1, in File "", line 1, in ValueError: too many values to unpack
not 2.4 compatible
falsetru@lj-lw20 ~ $ python2.4 Python 2.4.2 (#1, Oct 15 2005, 13:17:32) [GCC 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
(lambda(x): x)(1) 1 (lambda(x): x)((1,)) (1,) (lambda(x): x)((1,2)) (1, 2)