[Python-3000] [Python-Dev] PyString -> PyBytes C API renaming

Georg Brandl g.brandl at gmx.net
Thu May 29 16:28:16 CEST 2008


Stefan Behnel schrieb:
> Christian Heimes wrote:
>> Stefan Behnel schrieb:
>>> M.-A. Lemburg wrote:
>>>> If you use PyBytes APIs, you expect to find PyBytes functions in
>>>> the libs and also set breakpoints on these.
>>> AFAICT, the PyBytes_* functions are in both Py2.6 and Py3 now, so no problem here.
>> 
>> In Python 2.6 the PyBytes_* functions are only available to the compiler
>> but not to the linker. In 2.6 the ABI functions are PyString_* and in
>> 3.0 it's PyBytes_*
> 
> Ah, even better then. Given that it was always PyString_*() in Py2, that
> totally sounds like the right thing to me. I really don't think anyone using
> the newly advertised Py3 PyBytes_*() C-API functions will honestly expect them
> to be available in a 2.x binary lib.

Can't we have the best of both worlds -- have the macro and a stub function
for the linker, like done with PyErr_Warn?

Georg



More information about the Python-3000 mailing list