> It *does* implement that! So there's the solution: these APIs should
> not insist on bytes but use the buffer API. It's quite a bit of work I
> suspect (especially since you can't use PyArg_ParseTuple with y# any
> more) but worth it.

I think there could be another code for PyArg_ParseTuple (or the meaning
of y# be changed): that code would not only return char* and Py_ssize_t,
but also a PyObject* and fill a PyBuffer b to be passed to
PyObject_ReleaseBuffer(o, &b).

> BTW PyUnicode should *not* support the buffer API.

Why not? It should set readonly to 1, and format to "u" or "w".

Regards,
Martin

_______________________________________________
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