[Python-Dev] cpython: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724. (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Mon Aug 15 15:59:00 CEST 2011


On Mon, 15 Aug 2011 09:49:43 -0400 Barry Warsaw <barry at python.org> wrote:

On Aug 15, 2011, at 05:46 AM, Raymond Hettinger wrote:

>I don't think that is worth it. There is some value to keeping the API >consistent with the style that has been used in the past. So, I vote for >PyRETURNNOTIMPLEMENTED. There's no real need to factor this any further. >It's not hard and not important enough to introduce a new variation on return >macros. Adding another return style makes the C API harder to learn and >remember. If we we're starting from scratch, PyRETURN(obj) would make >sense. But we're not starting from scratch, so we should stick with the >precedents. I can see the small value in the convenience, but I tend to agree with Raymond here. I think we have to be careful about not descending into macro obfuscation world.

How is Py_RETURN(Py_NotImplemented) more obfuscated than Py_RETURN_NOTIMPLEMENTED ???



More information about the Python-Dev mailing list