Re: [Cython] dict set value

2008-09-04 Thread Greg Ewing
Robert Bradshaw wrote: >> it still generates inefficient code via PyObject, not via PyDict_SetItem: >> >> PyObject_SetItem(((PyObject *)__pyx_v_1a_a), __pyx_kp_1, __pyx_int_1) Keep in mind that the difference in efficiency is very small, since there is a direct path from PyObject_SetItem via the

Re: [Cython] dict set value

2008-09-04 Thread Robert Bradshaw
On Fri, 5 Sep 2008, Max Ivanov wrote: > Hi all! > > I'm new to Cython, but I'm really impressed by this product, thx to > all developers it look really great. Thanks. > My first newbie question following. > > Do I do something wrong here: > - > cdef dict a > a = {} > a['a'] = 1 > ---

[Cython] dict set value

2008-09-04 Thread Max Ivanov
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_S