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)?

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):
>        ...
>
> But somehow str is treated differently than int, dict, list, etc., which
> means I have to write:
>
>     cdef foo(int i, dict d, list l, s):
>         assert type(s) == str
>         ...
>
> I don't understand why this limitation exists.  Is it some artifact of
> the support for implicit casting for char * arguments?
>
> 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