Well, then it should be your Cython version. In cython-devel, this
works just fine (at least for Py2.X). We recently fixed some stuff
handling builtin types.

On Mon, Oct 27, 2008 at 3:42 PM, Jason Evans <[EMAIL PROTECTED]> wrote:
> Lisandro Dalcin wrote:
>> Are you running Python 3.0? In Python 2.X, I do not expect big
>> differences. Could you elaborate a bit more what you mean by str being
>> treated differently than list/dict (int is a completely different
>> thing, as it means a plain C int, not a PyInt_Type instance)?
>
> I am using Python 2.6.
>
>> On Mon, Oct 27, 2008 at 1:27 PM, Jason Evans <[EMAIL PROTECTED]> wrote:
>>> I would like to be able to write code like the following:
>>>
>>>     cdef foo(int i, dict d, list l, str s):
>>>        ...
>
> Here's what I get if I try to compile the above:
>
> ============================================================
> Error converting Pyrex file to C:
> ------------------------------------------------------------
> ...
> def foo(int i, dict d, list l, str s):
>                                   ^
> ------------------------------------------------------------
>
> /home/jasone/foo.pyx:1:35: Expected ')'
> ============================================================
>
> I can declare arguments to be of type dict or list, but not str.  I
> don't understand why str is treated differently.
>
> Thanks,
> Jason
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to