2012/4/22 Vitja Makarov :
> 2012/4/22 Nathan Dunfield :
>> 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)
2012/4/22 Nathan Dunfield :
> 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):
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)
## p
2012/4/22 Nathan Dunfield :
> With Cython 0.15, the following works with Python 2.7:
>
> ### start file: prob.pyx
>
> def f(x):
> cdef int* p
> return eval(x)
>
> ### end file
>
import pyximport; pyximport.install()
import prob
prob.f("5")
> 5
>
> but with Cython 0.16 it doesn'