On Thu, Oct 2, 2008 at 2:40 PM, Lisandro Dalcin <[EMAIL PROTECTED]> wrote: > Please, clarify my something: At wich stage the syntax error is shown > for Python 2.3? Do you mean the C compiler fails? Or is Cython > failing? >
Cython fails with a syntax error on "cdef set s". As an aside, if you have this in py2.3: """ #py 2.3 cdef object s s =set() """ Everything will compile fine but the module will fail to load when you try to import it with this message: "undefined symbol: PySet_Type". That's because Symtab.py assumes that sets are available in py2.3 also, and includes it in `builtin_entries` (a dict).Should we work around that or should we let users shoot themselves in the foot? >> I also had to modify PyrexTypes.py to make >> sure that PyAnySet_CheckExact() was being passed, instead of >> PySet_CheckExact() (there are 2 ways to check for the type of a set: >> PyAnySet_CheckExact and PyFrozenSet_CheckExact). Reviews welcome! > > Your patch seems fine, but I believe the fix for 'type_test_code()' > method is wrong for the case of 'frozenset', 'frozenset'.capitalize() > -> 'Frozenset', and you need 'FrozenSet', right? I would add these two > lines > > elif type == 'Frozenset' > type = 'FrozenSet' Right. > > As a final note, It would be great if you could also provide a test > (pyx file for compile and run) for all this! Ok, will do. didier _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
