Hi,

I have the following use case with OpenGL:

My colours are stored in 4-element tuples and should be passed to a 
OpenGL function by function unpacking

color = (0, 0, 0, 1)
glColor4f(*color)

But this doesn't work with Cython. I get the following error:


Error converting Pyrex file to C:
------------------------------------------------------------
...

def set_color():
   color = (0, 0, 0, 1)
   glColor4f(*color)
           ^
------------------------------------------------------------

gltest.pyx:16:13: Keyword arguments not allowed in cdef functions.


I am not using any keyword arguments. Are they internally used? What is 
the problem?

The workaround would be very verbose and more over those statements are 
spread all over my code.



Thanks in advance!

Christian


      
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to