Hi,

Is there any syntax that I can use to do something like this in Cython:

    py_object_ = PyList_New(123); ?

If not, do you think that this can be added in one way or another?

Unfortunately, I can't think of a non-disruptive way of doing it. For
instance, if this

    [None] * N

is given a completely new meaning, like make an empty list (of NULLs),
instead of making a real list of Nones, it will certainly break Python
code. Besides, it would probably be still faster than no pre-allocation,
but slower than an empty list with pre-allocation...

Maybe

    [NULL] * N ?

Any ideas?

-- 
Sincerely yours,
Yury V. Zaytsev


_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to