In some sites PyUnicode_FromFormat() and PyErr_Format() can be used instead of sprintf to a static or dynamically allocated buffer followed by (implicit) PyUnicode_FromString() or PyErr_SetString(). It would consume slightly more CPU and memory resources, but none of these places are performance critical and the new code is clearer.
serhiy-storchaka commentedNov 13, 2022
•
edited by bedevere-bot
In some sites
PyUnicode_FromFormat()
andPyErr_Format()
can be used instead ofsprintf
to a static or dynamically allocated buffer followed by (implicit)PyUnicode_FromString()
orPyErr_SetString()
. It would consume slightly more CPU and memory resources, but none of these places are performance critical and the new code is clearer.The text was updated successfully, but these errors were encountered: