On Mar 15, 2009, at 10:52 AM, Gabriel Gellner wrote:

> I can't seem to get optional arguments for a char variable to work  
> in a cdef
> function, is this a bug or am I missing something simple? Any help  
> would, as
> always, be greatly appreciated.
>
> For example:
>
>     cdef void test_args(int number, char letter='C'):
>         print letter
>
>     def test():
>         test_args(3, letter='F')

This is because cdef functions can't take keyword arguments. The error

     11:13: Cannot convert 'void (int, struct __pyx__test_args  
*__pyx_optional_args)' to Python object

should be better... http://trac.cython.org/cython_trac/ticket/241

- Robert

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

Reply via email to