Thanks for clarifying. And I wasn't telling to write if (obj != NULL) { Py_DECREF(obj); }
I was actually proposing to change the code in the static inline function _Py_DECREF by putting all of the code in the function inside the if block. But Chris has a point. If we know for sure that it isn't NULL, why have an unnecessary branch? And it's true. It would have to execute one more step (the if block) every time Py_DECREF is used when it is actually not needed. Moreover I thought about what you said Serhiy about breaking every bit of code. Actually I knew it would break that's why I said in future Python version. But anyway it's not necessary to change Py_DECREF and moreover deprecating Py_XDECREF would cause even more problem. Thanking you, With Regards _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/U5MWF7FHQDPFBZ3M3SYFWNLVUCRSDT3E/ Code of Conduct: http://python.org/psf/codeofconduct/