[Python-Dev] Re: String module
Fri, 31 May 2002 11:33:53 -0400 (EDT)
On Fri, 31 May 2002, Guido van Rossum wrote:
> > > > By the way, I wonder why the `_' in `sys._getframe()'.
> > > To discourage people from using it.
> > Why was it introduced then, since there was already a way without it?
> Because there are legitimate uses -- mostly in the area of
> introspection or debugging -- and the existing way (catching an
> exception) was clumsy.
Clumsy and broken -- the old trick destroys the current exception context,
so it is not safe to use in places where that side-effect is undesirable
(which is all of the places I actually wanted to use it).
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19 E-mail: firstname.lastname@example.org
Fax: (216) 986-0714 WWW: http://www.theopalgroup.com