[Python-Dev] PyObject_New vs PyObject_NEW (original) (raw)

Michael Hudson mwh@python.net
Thu, 13 Mar 2003 11:02:31 +0000


Tim Peters <tim.one@comcast.net> writes:

[David Abrahams]

... It seems to me that in light of all this, it's probably worth noting this difference between PyObjectNew and PyObjectNEW in the docs. I don't think the macro versions should ever be used outside the core. Inside the core, it's safe. So I think the "doc bug" is that the docs mention PyObjectNEW at all.

What, precisely, does PyObject_NEW save you? From a brief squint at the sources, my best guess is "nothing" -- and it may even be a pessimization due to increased code size.

Maybe we could kill it entirely (after the usual round of deprecations, of course).

Cheers, M.

-- Like most people, I don't always agree with the BDFL (especially when he wants to change things I've just written about in very large books), ... -- Mark Lutz, http://python.oreilly.com/news/python_0501.html