> > > 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. --Guido van Rossum (home page: http://www.python.org/~guido/)