Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

There is no longer PyString in Python, only PyUnicode.

There are plans to get rid of PyUnicode_READY(). After removing support of 
"legacy" Unicode objects (which will happen in few years), PyUnicode_READY() 
will be no longer needed, so all calls of it could be removed. Currently there 
is a last chance to redesign it for other purposes. I suggest to discuss this 
on one of mailing lists (Python-ideas or even Python-Dev) with wider auditory, 
as it can have large impact on the future of C API.

Although I am not sure that PyUnicode_READY() is called in all needed cases. It 
just happen that the code is not tested intensively with "legacy" Unicode 
objects because in normal case you get already ready objects. Actually, 
functions like _PyUnicode_EqualToASCIIString do not call it intentionally and 
read the Py_UNICODE content of non-ready Unicode objects directly.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42731>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to