[Python-Dev] Re: String module

François Pinard pinard@iro.umontreal.ca
31 May 2002 11:20:11 -0400


[Guido van Rossum]

> > 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?
Execution speed, maybe?  Writing speed is probably not a consideration,
as the previous way was a bot discouraging already, in that respect :-).

> 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.

Does it exist for another purpose?  Getting the frame, you will say! :-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard