A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/024799.html below:

[Python-Dev] Re: String module

[Python-Dev] Re: String module [Python-Dev] Re: String moduleKevin Jacobs jacobs@penguin.theopalgroup.com
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).

-Kevin

--
Kevin Jacobs
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19         E-mail: jacobs@theopalgroup.com
Fax:   (216) 986-0714              WWW:    http://www.theopalgroup.com





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4