[Python-Dev] Traceback problem

Christian Tismer tismer@tismer.com
Tue, 25 Feb 2003 00:29:57 +0100


Guido van Rossum wrote:
> Sure, as long as it is part of Stackless and not of Python proper.
> 
> Actually, I've wanted a reset_exc() call from time to time.  What is the
> barrer to having in the core?
> 
> 
> I believe that Stackless supports Python 2.1 or older, and we're not
> adding features.  Even if Stackless supported Python 2.2, adding a new
> feature would be iffy.

Huh? What makes you believe that?
I'm talking of 2.3, of course.

Sure, it is possible for long-running functions to wrap
any exception-raising stuff into an extra wrapping function
that always returns after the exception has happened,
and to let the main worker function run without try..except.
But is this very cool?

I would also like to point out that the documentation
of sys.exc_info is very misleading, and I always
programmed acording to this false information:

"""
 >>> print sys.exc_info.__doc__
exc_info() -> (type, value, traceback)

Return information about the exception that is currently being handled.
This should be called from inside an except clause only.
 >>>
"""

Where I have to say that I'm in favor of doing like
the documentation claims.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer@tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/