Hello Stefan, Thanks! I really appreciate it.
FYI: I'm not sure if it's related, but your changeset 1375 introduced a bug that gives me the traceback: File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 323, in generate_function_definitions stat.generate_function_definitions(env, code) File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 2540, in generate_function_definitions self.entry.type.scope, code) File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 323, in generate_function_definitions stat.generate_function_definitions(env, code) File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 1026, in generate_function_definitions self.body.generate_execution_code(code) File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 329, in generate_execution_code stat.generate_execution_code(code) File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 2658, in generate_execution_code self.generate_rhs_evaluation_code(code) File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/Nodes.py", line 2771, in generate_rhs_evaluation_code self.rhs.generate_evaluation_code(code) File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ExprNodes.py", line 442, in generate_evaluation_code self.generate_result_code(code) File "/home/hoytak/sysroot/lib/python2.5/site-packages/Cython/Compiler/ExprNodes.py", line 4524, in generate_result_code if not dst_type.is_builtin_type: NameError: global name 'dst_type' is not defined It looks easy to fix, but I'm not sure how, and you could probably fix it in 5 seconds. Thanks again! --Hoyt On Tue, Nov 25, 2008 at 11:25 AM, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Hi, > > Hoyt Koepke wrote: >> In iteration over a dictionary, I'm declaring both the variables of >> iteration to have explicit types; i.e. my code is: >> >> cdef int k >> cdef double v >> >> for k, v in d.iteritems(): >> # do things >> >> >> However, in the c code, I find the following: >> >> int __pyx_v_k; >> double __pyx_v_v; >> ... >> void *__pyx_t_2; >> void *__pyx_t_3; >> ... >> if (!PyDict_Next(__pyx_t_1, (&__pyx_5), ((PyObject**)(&__pyx_t_2)), >> ((PyObject **)(&__pyx_t_3)))) break; >> __pyx_v_k = ((int)__pyx_t_2); >> __pyx_v_v = ((double)__pyx_t_3); > > Thanks for the report. This was the right thing to do for Python objects, > but not for C types. Should be fixed now. > > Stefan > > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > -- ++++++++++++++++++++++++++++++++++++++++++++++++ + Hoyt Koepke + University of Washington Department of Statistics + http://www.stat.washington.edu/~hoytak/ + [EMAIL PROTECTED] ++++++++++++++++++++++++++++++++++++++++++ _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
