Hi everyone,
I ran into the following problem using Cython 0.17.4 (current version of
Sage).
If you try to compile a file with the following function in it:
def test_double_gen(L):
a = all(x != 0 for x in L)
b = all(x != 1 for x in L)
return a and b
you get errors from the Cython compiler about 'genexpr' being redefined.
Error compiling Cython file:
------------------------------------------------------------
...
def test_double_gen(L):
a = all(x != 0 for x in L)
b = all(x != 1 for x in L)
^
------------------------------------------------------------
cython_test.pyx:5:14: 'genexpr' already declared
Error compiling Cython file:
------------------------------------------------------------
...
def test_double_gen(L):
a = all(x != 0 for x in L)
^
------------------------------------------------------------
cython_test.pyx:4:14: Previous declaration is here
Error compiling Cython file:
------------------------------------------------------------
...
def test_double_gen(L):
a = all(x != 0 for x in L)
b = all(x != 1 for x in L)
^
------------------------------------------------------------
cython_test.pyx:5:14: 'genexpr' redeclared
Are you currently only able to use one inline generator pre function?
David
_______________________________________________
cython-devel mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cython-devel