[Cython] dict set value

Max Ivanov ivanov.maxim at gmail.com
Thu Sep 4 22:13:01 CEST 2008


Hi all!

I'm new to Cython, but I'm really impressed by this product, thx to
all developers it look really great. My first newbie question
following.

Do I do something wrong here:
---------
cdef dict a
a = {}
a['a'] = 1
----------

it still generates inefficient code via PyObject, not via PyDict_SetItem:

PyObject_SetItem(((PyObject *)__pyx_v_1a_a), __pyx_kp_1, __pyx_int_1)


More information about the Cython-dev mailing list