[Python-Dev] C-API status of Python 3?
M.-A. Lemburg
mal at egenix.com
Sun Mar 2 14:59:24 CET 2008
On 2008-03-02 14:47, Christian Heimes wrote:
> Alex Martelli wrote:
>> Yep, but please do keep the PyUnicode for str and PyString for bytes
>> (as macros/synonnyms of PyStr and PyBytes if you want!-) to help the
>> task of porting existing extensions... the bytearray functions should
>> no doubt be PyBytearray, though.
>
> Yeah, we've already planed to keep PyUnicode as prefix for str type
> functions. It makes perfectly sense, not only from the historical point
> of view.
>
> But for PyString I planed to rename the prefix to PyBytes. In my opinion
> we are going to regret it, when we keep too many legacy names from 2.x.
> In order to make the migration process easier I can add a header file
> that provides PyString_* functions as aliases for PyBytes_*
>
> Comments?
+1
Why not also make unicode() the default type constructor and only
keep str() as alias to simplify porting (perhaps with a warning) ?
The term "string" is just too overloaded with all kinds of
misinterpretations. The term "string" just refers to a string of
bytes - a variable length array so to speak. However, depending
on the application space, "string" is used as synonym for
"text string" just as well as "data string".
Removing the term "string" altogether would make it easier for
people to understand that Py3k only has unicode (for text data)
and bytes (for binary data).
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Mar 02 2008)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the Python-Dev
mailing list