[Python-Dev] Generalised String Coercion
Aahz
aahz at pythoncraft.com
Mon Aug 8 17:41:57 CEST 2005
On Sun, Aug 07, 2005, Neil Schemenauer wrote:
> On Sat, Aug 06, 2005 at 06:56:39PM -0700, Guido van Rossum wrote:
>>
>> My first response to the PEP, however, is that instead of a new
>> built-in function, I'd rather relax the requirement that str() return
>> an 8-bit string
>
> Do you have any thoughts on what the C API would be? It seems to me
> that PyObject_Str cannot start returning a unicode object without a
> lot of code breakage. I suppose we could introduce a function
> called something like PyObject_String.
OTOH, should Guido change his -1 on text(), that leads to the obvious
PyObject_Text.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
The way to build large Python applications is to componentize and
loosely-couple the hell out of everything.
More information about the Python-Dev
mailing list