Barry Warsaw wrote:
On Aug 16, 2011, at 08:32 AM, Nick Coghlan wrote:
Based on this thread, there are actually two options I'd be fine with:
1. Just revert it and leave Py_RETURN_NONE as a special snowflake
2. Properly generalise the incref-and-return idiom via a Py_RETURN macro

Incrementally increasing complexity by adding a second instance of the
dedicated macro approach is precisely what we *shouldn't* be doing.

My problem with Py_RETURN(x) is that it's not clear that it also does an
incref, and without that, I think it's *more* confusing to use rather than
just writing it out explicitly, Py_RETURN_NONE's historic existence
notwithstanding.

So I'd opt for #1, unless we can agree on a better color for the bikeshed.

My apologies if this is just noise, but are there RETURN macros that don't do an INCREF?

~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to