On Sat, Sep 27, 2008 at 10:39 AM, Christian Heimes <[EMAIL PROTECTED]> wrote:
>> In the Python side, 'str' sould be the the type Python uses for
>> attributes and names. In the C side, that would be 'PyString_Type'.
>> Of course, Cython has to #define  PyString_Type to PyUnicode_Type for
>> Py3 (currently, PyString_Type is #define'd as PyBytes_Type for Py3).
>
> The proposal could cause confusion. Python 3.0's PyBytes type is a
> slightly modified and renamed version of Python 2.0's PyString type. A
> few months ago the PyBytes_* functions were still called PyString_*
> until I renamed them.

Yes, but now the Python C-API has finally stabilized, right?.  So this
should not make confusion in the near future when users have the first
final release of Python 3.0.

> Does Cython provide aliases for PyBytes -> PyString for all versions of
> Python 2.x? It would be helpful for Python 3.0 compatible code.

Yes, more or less. It also supports the b"" prefix for all Python
versions, and also the u"" prefix (unfortunatelly unavailable in Py3).
 The 'unicode' builting is associated with PyUnicode_Type,  I'm
working on a (few lines) pach for associating the 'bytes' builtin as
appropriate. Was has to be discussed a bit more is the association of
the 'str' builtin; currently, it is an alias por 'bytes' in Py3, and
I'm not confortable with that.

>> What to you think, Christian? Do my later comments make sense for you?
>
> I see your problem ... I've to think about the implications more carefully.
>

OK.


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to