[Python-Dev] cpython: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724. (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Mon Aug 15 14:35:08 CEST 2011
- Previous message: [Python-Dev] cpython: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724.
- Next message: [Python-Dev] cpython: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Aug 15, 2011 at 10:17 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
AFAICT, often with True and False:
x = (some condition) ? PyTrue : PyFalse; PyINCREF(x); return x;
And that's an idiom that works better with a Py_RETURN macro than it would separate macros:
Py_RETURN(cond ? Py_True : Py_False);
OK, I'm persuaded that "Py_RETURN(Py_NotImplemented);" would be a better way to handle this change: +1
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] cpython: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724.
- Next message: [Python-Dev] cpython: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]