[Python-Dev] Re: String module
31 May 2002 14:22:34 -0400
> >> By the way, I wonder why the `_' in `sys._getframe()'.
> >> To discourage people from using it.
> Because [the previous way] is slow, hard to remember, and too magical.
That is, in short, discouraging, exactly as per the wish of Guido! :-)
A bit more seriously, it is fun writing:
frame = sys._getframe(1)
frame = sys.exc_info().tb_frame.f_back
putting the error to good use whenever `_getframe' is not available!
François Pinard http://www.iro.umontreal.ca/~pinard