STINNER Victor added the comment: About _PY_ONCEVAR_INIT() vs _Py_IDENTIFIER.
Using _Py_IDENTIFIER works well if you have an API accepting directly a _Py_IDENTIFIER*. If you call functions requesting a PyObject*, you need to call _PyUnicode_FromId() and test for failure. If you start by calling _PyUnicode_FromId() when the object is not initialized yet, above you have to use var.object, whereas previously Serhiy and Nick weren't confortable with this specific case. I prefer to use _PY_ONCEVAR_INIT() to keep a regular PyObject* variable and makes the code simpler. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29881> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com