<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 15, 2011, at 5:35 AM, Nick Coghlan wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Mon, Aug 15, 2011 at 10:17 PM, Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br><blockquote type="cite">AFAICT, often with True and False:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> x = (some condition) ? Py_True : Py_False;<br></blockquote><blockquote type="cite"> Py_INCREF(x);<br></blockquote><blockquote type="cite"> return x;<br></blockquote><br>And that's an idiom that works better with a Py_RETURN macro than it<br>would separate macros:<br><br>Py_RETURN(cond ? Py_True : Py_False);<br><br>OK, I'm persuaded that "Py_RETURN(Py_NotImplemented);" would be a<br>better way to handle this change: +1<br></div></blockquote><br></div><div>I don't think that is worth it.</div><div>There is some value to keeping the API consistent with the style that has been used in the past.</div><div>So, I vote for Py_RETURN_NOTIMPLEMENTED. There's no real need to factor this any further.</div><div>It's not hard and not important enough to introduce a new variation on return macros.</div><div>Adding another return style makes the C API harder to learn and remember.</div><div>If we we're starting from scratch, Py_RETURN(obj) would make sense.</div><div>But we're not starting from scratch, so we should stick with the precedents.</div><div><br></div><div><br></div><div>Raymond</div><div><p style="margin: 0.0px 0.0px 1.0px 56.0px; text-indent: -56.0px; font: 12.0px Helvetica"><b><br></b></p></div><br></body></html>