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/024774.html below:

[Python-Dev] Re: String module

[Python-Dev] Re: String module [Python-Dev] Re: String moduleGuido van Rossum guido@python.org
Fri, 31 May 2002 10:03:44 -0400
> By the way, I wonder why the `_' in `sys._getframe()'.  Was it to
> mark that this is a function giving access to internals?  If yes,
> this only increases my wondering, since there are other functions in
> `sys' which give access to internals, and which do not use such a
> `_' prefix.  I presume this has been debated in the proper time, I
> was probably elsewhere and missed the discussion.  Could the reason
> be summarised in one sentence? :-)

To discourage people from using it.  This function enables a
programming idiom where a function digs in its caller's namespace.  I
find that highly undesirable so I wanted to emphasize that this
function does not exist for that purpose.  (Neither does
inspect.currentframe(). :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)




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