On Wed, Nov 17, 2010 at 12:08 AM, Robert Bradshaw <[email protected]> wrote: > On Tue, Nov 16, 2010 at 11:47 PM, Stefan Behnel <[email protected]> wrote: >> Robert Bradshaw, 17.11.2010 08:40: >>> On Mon, Nov 15, 2010 at 9:04 AM, Darren Dale wrote: >>>> I can cythonize this code: >>>> >>>> def test(): >>>> sentinal = '3' >>>> with open('foo.txt', 'w') as f: >>>> sentinal == '1' or sentinal == '2' >>>> >>>> or this: >>>> >>>> def test(): >>>> sentinal = '3' >>>> with open('foo.txt', 'w') as f: >>>> pass >>>> sentinal in ('1', '2') >>>> >>>> but not this: >>>> >>>> def test(): >>>> sentinal = '3' >>>> with open('foo.txt', 'w') as f: >>>> sentinal in ('1', '2') >>>> >>>> >>>> $ cython test_open.pyx >>>> >>>> Error converting Pyrex file to C: >>>> ------------------------------------------------------------ >>>> ... >>>> def test(): >>>> sentinal = '3' >>>> with open('foo.txt', 'w') as f: >>>> ^ >>>> ------------------------------------------------------------ >>>> >>>> /Users/darren/temp/test/test_open.pyx:3:4: Compiler crash in >>>> AnalyseExpressionsTransform >>>> >>> Yep, looks like a bug to me. >> >> In general, it is a bug if the compiler crashes on whatever code, instead >> of printing a suitable error message. > > I agree, I was just stating that I confirmed it. > >> Please file a bug report. > > As soon as I get trac up and running...
http://trac.cython.org/cython_trac/ticket/595 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
