2012/4/22 Nathan Dunfield <n...@illinois.edu>: > On Apr 22, 2012, at 1:22 PM, Vitja Makarov wrote: >> Oops, it seems to be a problem with locals() dict creation. > > Yes it does. The following variants of my original example both work: > > ## prob.pyx version 1 > > def cy_eval(s): > return eval(s) > > def f(x): > cdef int* p > return cy_eval(x) > > ## prob.pyx version 2 > > def f(x): > cdef int* p > return eval(x, {}) > > Best, > > Nathan >
I've fixed it here: https://github.com/vitek/cython/commit/6dc132731b8f3f7eaabf55e51d89bcbc7b8f4eb7 Now waiting for jenkins, then I'll push it into upstream. As a workaround you can manually pass locals dictionary, e.g.: eval(x, None, {'a: a}) -- vitja. _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel