Petr Viktorin <encu...@gmail.com> added the comment:

> The PEP 399 requires that C accelerator behaves exactly as Python, [...]

It does not. PEP 399 requires that that the C code must pass the same *test 
suite*. And error messages in particular tend to not be checked in tests.

Anyway, I don't see how that applies to replacing `Py_TYPE(obj)->tp_name` by 
`%T`. The real reason for *that* change is removing borrowed references, right?
I have not yet seen a good reason why Py_TYPE(obj) is bad. The reasons you give 
in https://pythoncapi.readthedocs.io/bad_api.html#borrowed-references are about 
tagged pointers and PyList_GetItem(), but Py_TYPE() is very different.

I don't think the reasons are strong enough to add new API to 
PyUnicode_FromFormat().

----------
nosy: +petr.viktorin

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

Reply via email to