[Bug] Don't compile lambda with tuple argument.
λ $ cat /tmp/test.pyx f = lambda (name,v):True λ $ cython /tmp/test.pyx Error compiling Cython file: ------------------------------------------------------------ ... f = lambda (name,v):True ^ ------------------------------------------------------------ /tmp/test.pyx:1:19: Empty declarator Tested with both 0.21 and 0.23
Even function with tuple match parameter don't work either. ``` def test((name, v)): return True ``` ``` Error compiling Cython file: ------------------------------------------------------------ ... def test((name, v)): ^ ------------------------------------------------------------ /private/tmp/test.pyx:3:18: Empty declarator ``` On Tue, Nov 10, 2015 at 8:01 AM, yi huang <yi.codeplayer@gmail.com> wrote:
λ $ cat /tmp/test.pyx f = lambda (name,v):True
λ $ cython /tmp/test.pyx
Error compiling Cython file: ------------------------------------------------------------ ... f = lambda (name,v):True ^ ------------------------------------------------------------
/tmp/test.pyx:1:19: Empty declarator
Tested with both 0.21 and 0.23
On Mon, Nov 9, 2015 at 4:15 PM, yi huang <yi.codeplayer@gmail.com> wrote:
Even function with tuple match parameter don't work either.
``` def test((name, v)): return True ```
``` Error compiling Cython file: ------------------------------------------------------------ ... def test((name, v)): ^ ------------------------------------------------------------
/private/tmp/test.pyx:3:18: Empty declarator ```
On Tue, Nov 10, 2015 at 8:01 AM, yi huang <yi.codeplayer@gmail.com> wrote:
λ $ cat /tmp/test.pyx f = lambda (name,v):True
λ $ cython /tmp/test.pyx
Error compiling Cython file: ------------------------------------------------------------ ... f = lambda (name,v):True ^ ------------------------------------------------------------
/tmp/test.pyx:1:19: Empty declarator
Tested with both 0.21 and 0.23
Yes, this went away in Python 3 as well: https://www.python.org/dev/peps/pep-3113/ .
participants (2)
-
Robert Bradshaw -
yi huang