[Python-Dev] Please reconsider PEP 479.

Guido van Rossum guido at python.org
Thu Nov 27 02:15:58 CET 2014


On Wed, Nov 26, 2014 at 2:53 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:

> On 27 Nov 2014 06:35, "Guido van Rossum" <guido at python.org> wrote:
> [...]
>
> > I think we can put a number to "much faster" now -- 150 nsec per
> try/except.
> >
> > I have serious misgivings about that decorator though -- I'm not sure
> how viable it is to pass a flag from the function object to the execution
> (which takes the code object, which is immutable) and how other Python
> implementations would do that. But I'm sure it can be done through sheer
> willpower. I'd call it the @hettinger decorator in honor of the PEP's most
> eloquent detractor. :-)
>
> I agree with everything you wrote in your reply, so I'll just elaborate a
> bit on my proposed implementation for the decorator idea.
>
This remark is  ambiguous -- how strongly do you feel that this decorator
should be provided? (If so, it should be in the PEP.)

(I'm snipping the rest of what you said, since I understand it: the flag on
the code object even has a name in the PEP, it's REPLACE_STOPITERATION --
although I could imagine renaming it to GENERATOR_STOP to match the
__future__.)
-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20141126/c34a40b2/attachment-0001.html>


More information about the Python-Dev mailing list