Folks,
I am setting out to Cythonize a function, and found that Cython does
not appear to support tuple unpacking in function arguments. This is
perfectly legal Python:
def test_tuple_unpack((x_1, y_1), (x_2, y_2)):
print x_1, y_1, x_2, y_2
but when I try to run Cython on it:
$ cython tuple_unpack_args.pyx
Error compiling Cython file:
------------------------------------------------------------
...
def test_nested_tuples((x_1, y_1), (x_2, y_2)):
^
------------------------------------------------------------
tuple_unpack_args.pyx:1:27: Expected ')', found ','
$ cython --version
Cython version 0.17.1
Whether we want to support this I don't know, but if the goal is to be
able to compile all legal python, then this is a missing feature.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R
(206) 526-6959 voice
7600 Sand Point Way NE
(206) 526-6329 fax
Seattle, WA 98115
(206) 526-6317 main reception
Chris....@noaa.gov