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

George Sakkis george.sakkis at gmail.com
Wed Mar 18 19:07:47 CET 2009

On Wed, Mar 18, 2009 at 1:42 PM, Leif Walsh <leif.walsh at gmail.com> wrote:
> 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.

That's not always true; StopIteration comes to mind.


More information about the Python-ideas mailing list