[Cython] Control Flow

Stefan Behnel stefan_ml at behnel.de
Sat May 28 13:27:39 CEST 2011


Vitja Makarov, 28.05.2011 11:48:
> 2011/5/28 Robert Bradshaw:
>> On Fri, May 27, 2011 at 7:27 AM, Vitja Makarov wrote:
>>> I've recently fixed some issues:
>>>
>>>   - closure variables were not tracked
>>>   - scoped expression variables were initialized to None
>>>
>>> So, I should fix broken tests, here are some of them:
>>>
>>> nogil (should be fixed)
>>> purecdef (upstream)
>>> cfunc_directive_in_pyclass (upstream)
>>> bufaccess_noassignT444 (should be removed?)
>>> bufaccess (should be fixed)
>>> ass2longlong (should be fixed)
>>> builtinfuncs (should be fixed)
>>> extcmethcall (should be fixed)
>>> extcoerce (fixed or removed?)
>>
>> Unless you see this code being exercised elsewhere (a run test would
>> be better her anyways) it's an easy fix that should be done.
>>
>>> e_extweakref (should be fixed)
>>>
>
> I've fixed all the tests.

Cool.


> Now I see this strange error in py2.4:
>
> https://sage.math.washington.edu:8091/hudson/view/cython-vitek/job/cython-vitek-tests-py24-c/lastCompletedBuild/testReport/(root)/CythonCompileTestCase/compiling__c__w_uninitialized_py3/
>
> *****************
> compiling (c) w_uninitialized_py3
> === Expected errors: ===
> 7:11: local variable 'i' referenced before assignment
> 13:11: local variable 'i' referenced before assignment
>
>
> === Got errors: ===
> 7:9: undeclared name not builtin: print
> 7:11: local variable 'i' referenced before assignment
> 13:11: local variable 'i' referenced before assignment

I guess that's

http://trac.cython.org/cython_trac/ticket/69

In short, print() still isn't supported before Py2.6. I'd just disable that 
test in older Python versions for now.

Stefan


More information about the cython-devel mailing list