[Patches] Patch: AttributeError and NameError: second attempt.
Guido van Rossum
guido@python.org
Sun, 28 May 2000 19:00:39 -0500
> >You mean CVS Python + your patch ? If yes, how can there be
> >a speedup of this amount ?
>
> Because we're only testing the time it takes to generate and throw the
> exception. When you throw an AttributeError on an Object now, you
> need to generate a new string containing the Object's type and the
> missing attribute. With my patch, even _this_ work was postponed until
> you printed the exception.
>
> Nick
Good point. The less work is done when the exception is raised, the
better. (I think that since the traceback is available separately it
shouldn't be necessary to reference the frame or the namespace from
the exception.)
--Guido van Rossum (home page: http://www.python.org/~guido/)