On Sep 29, 2008, at 9:23 AM, Lisandro Dalcin wrote:

> Rober, here you have a patch populating builtin types in Bultin.py and
> Symtab.py. The full testsuite pass with Py2.3.6 and Py2.5.2 and Py2.6
> (recent trunk checkout). Additionally, you have attached a new test
> (should go to 'tests/run' dir) for isinstance optimization with
> builtin types. Some notes below
>
> * I deliberately added 'set' to the builtin types. If set is ever used
> in Cython sources, then that source will not compile in Python 2.3.x.
> Perhaps the 'set' and 'frozenset' builtins could be somewhat emulated
> in Py2.3.x with 'sets.Set' and 'set.InmutableSet' from the Python(2.3)
> stdlib.

I think this is fine. Currently, one can use builtins from higher  
versions of python, it just pushes the minimum requirement up (just  
as with .py files).

> * The 'str' builtin is mapped to PyString_Type. In Py3, Cython
> #define's PyString_Type to PyBytes_Type, so this map is safe. Of
> course, I still believe that Cython should #define PyString_Type to
> PyUnicode_Type for Py3. But that discussion is for the future.
>
> Regards, and let me know if you ever push this.

Done, and passes all tests. Thanks.

- Robert


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to