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>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4