[Python-Dev] cpython: Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724.
Benjamin Peterson
benjamin at python.org
Mon Aug 15 04:48:45 CEST 2011
2011/8/14 Brett Cannon <brett at python.org>:
>
>
> On Sun, Aug 14, 2011 at 19:36, Benjamin Peterson <benjamin at python.org>
> wrote:
>>
>> 2011/8/14 Brett Cannon <brett at python.org>:
>> >
>> >
>> > On Thu, Aug 11, 2011 at 00:02, Antoine Pitrou <solipsis at pitrou.net>
>> > wrote:
>> >>
>> >> Le Thu, 11 Aug 2011 03:34:37 +0200,
>> >> brian.curtin <python-checkins at python.org> a écrit :
>> >> > http://hg.python.org/cpython/rev/77a65b078852
>> >> > changeset: 71809:77a65b078852
>> >> > parent: 71803:1b4fae183da3
>> >> > user: Brian Curtin <brian at python.org>
>> >> > date: Wed Aug 10 20:05:21 2011 -0500
>> >> > summary:
>> >> > Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724.
>> >>
>> >>
>> >> It would sound more useful to have a generic Py_RETURN() macro rather
>> >> than
>> >> some specific forms for each and every common object.
>> >
>> > Since the macro is rather generic, sure, but the name should probably be
>> > better since it doesn't necessarily convene the fact that a INCREF has
>> > occurred. So maybe Py_INCREF_RETURN()?
>>
>> That nearly nullifies the space saving. I think that fact that it's a
>> macro at all conveys that it does something else aside from "return
>> x;".
>
> This is C code; space savings went out the window along with gc a long time
> ago.
I'm hanging on to it by a hair. :)
--
Regards,
Benjamin
More information about the Python-Dev
mailing list