[Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0 (original) (raw)
Lisandro Dalcin dalcinl at gmail.com
Tue May 27 15:39:02 CEST 2008
- Previous message: [Python-Dev] [Python-3000] PyString -> PyBytes C API renaming (Stabilizing the C API of 2.6 and 3.0)
- Next message: [Python-Dev] Please svnmerge your changes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Chistian, I've posted some weeks ago some observation about the status of PyNumberMethods API. The thread link is below, I t did not received much atention.
http://mail.python.org/pipermail/python-3000/2008-May/013594.html
Now I sumarize that post
- 'nb_nonzero' was renamed to 'nb_bool'
- 'nb_inplace_divide' was removed
- 'nb_hex', 'nb_oct', and 'nb_coerce' are there, but they are unused
IMHO, the PyNumbersMethods struct should be left as in Py2, or it should be cleaned up, that is, all unused slots should be removed.
On 5/25/08, Christian Heimes <lists at cheimes.de> wrote:
Hello!
The first set of betas of Python 2.6 and 3.0 is fast apace. I like to grab the final chance and clean up the C API of 2.6 and 3.0. I know, I know, I brought up the topic two times in the past. But this time I mean it for real! :] Last time Guido said: --- I think it can actually be simplified. I think maintaining binary compatibility between 2.6 and earlier versions is hopeless anyway, so we might as well just rename PyString to PyBytes in 2.6 and 3.0, and have an extra set of macros so that code using PyString needs to be recompiled but not otherwise touched. E.g. typedef { ... } PyBytesObject; #define PyStringObject PyBytesObject ... PyStringType; #define PyBytesType PyStringType --- I like to follow Guido's advice and change the code as following: * replace PyBytes with PyByteArray * replace PyString with PyBytes * rename bytesobject.[ch] to bytearrayobject.[ch] * rename stringobject.[ch] to bytesobject.[ch] * add a new file stringobject.h which contains the aliases PyString -> PyBytes Christian
Python-3000 mailing list Python-3000 at python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/dalcinl%40gmail.com
-- 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
- Previous message: [Python-Dev] [Python-3000] PyString -> PyBytes C API renaming (Stabilizing the C API of 2.6 and 3.0)
- Next message: [Python-Dev] Please svnmerge your changes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]