Raymond Hettinger added the comment: I don't think most of these should be done. In most of these cases, the code is very old, stable, readable, and shouldn't be churned unnecessarily.
Also, putting a function call inside a macro is a worrisome practice in C. Ordinarily, we have long preferred a style of putting the components on separate lines to make the code less magical. Py_SETREF(result, PyNumber_Add(result, item)); Py_SETREF(buffer, PyUnicode_AsEncodedString(buffer, "utf-8", "surrogatepass")); Py_SETREF(text, _PyObject_CallMethodId(text, &PyId_replace, "ss", "\n", self->writenl)); Ask Guido whether he thinks any of the above are a good idea? While it is a bit shorter, it also interferes with my ability to decrypt and reason about the code (especially when I'm trying to count references or trying to ascertain whether an error condition has been checked). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26200> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com