[Python-ideas] thoughts on generator.throw()

Leif Walsh leif.walsh at gmail.com
Wed Mar 18 18:42:42 CET 2009

On Wed, Mar 18, 2009 at 1:20 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> - raise should be decently fast, which is easier with a dedicated bytecode.

Why does raise have to be decently fast?

In my average case, at least, it's encountered at most once per
program execution.  Even if I was good about catching exceptions, the
point is that they're _exceptional_ cases, so they shouldn't be
happening very often.  I'm not about to say raise should be a
function, but I don't think it's got a huge speed requirement.


More information about the Python-ideas mailing list