On 9/13/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh schrieb:
> > just noticed that PEP 3100 says that PyString_AsEncodedString and
> > PyString_AsDecodedString is to be removed, but it doesn't mention
> > any other PyString (or PyUnicode) functions.

> > how large changes can we make here, really ?

> All API that refers to the internal representation should be
> changed or removed; in theory, that could be all API that has
> char* arguments.

This is sufficient to allow polymorphic strings -- including strings
whose data is implemented as a view into some other object.

> For example, PyString_From{String[AndSize]|Format} would either:
> - have to grow an encoding argument
> - assume a default encoding (either ASCII or UTF-8)
> - change its signature to operate on Py_UNICODE* (although
>   we don't have literals for these) or
> - be removed

Should encoding be an attribute of the string?

If so, should recoding require the creation of a new string (in the
new encoding)?

-jJ
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to