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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com