[Python-Dev] with_traceback (original) (raw)

Adam Olsen rhamph at gmail.com
Thu Mar 1 03:36:39 CET 2007


On 2/28/07, Guido van Rossum <guido at python.org> wrote:

I am beginning to think that there are serious problems with attaching the traceback to the exception; I really don't like the answer that pre-creating an exception is unpythonic in Py3k.

How plausible would it be to optimize all exception instantiation? Perhaps use slots and a freelist for everything inheriting from BaseException and not inheriting from other builtin types?

On 2/28/07, Jean-Paul Calderone <exarkun at divmod.com> wrote: > On Wed, 28 Feb 2007 18:29:11 -0700, Adam Olsen <rhamph at gmail.com> wrote: > > > >I believe calling copy.copy() would be sufficient. > > > That doesn't sound like an improvement to me. Normal code will be more > wasteful. Code which the author has gone out of his way to tune will be > as wasteful as /average/ code currently is, and more wasteful than tuned > code now is. >

-- Adam Olsen, aka Rhamphoryncus



More information about the Python-Dev mailing list