[Cython] Lists?
Stefan Behnel
stefan_ml at behnel.de
Mon Sep 1 07:42:55 CEST 2008
Hi,
T J wrote:
> New to cython, and I found the sphinx documentation very helpful.
> However, I didn't find much about dictionaries and lists. How does
> cython handle these....
It uses Python's list/dict type.
> for example, if I were to have a list of
> strings....is there a way to inform cython about this so that it could
> be compiled?
The creation of such a list runs in compiled code. But you cannot specify the
type of the list content. And I don't see a use case for that.
> I'm assuming non-homogeneous lists are not candidates
> for optimizations (correct?).
There is no difference between a list with homogeneous content and one with
mixed content. What would you like to see 'optimised'?
> In general, I guess I am looking for
> more discussion/help about such topics. Any pointers would be
> appreciated.
Maybe you could tell us what you want to achieve? That would make it easier to
answer your question.
Stefan
More information about the Cython-dev
mailing list