[Python-Dev] Python 2.1 PEPs

Jeremy Hylton jeremy@digicool.com
Wed, 18 Apr 2001 10:07:31 -0400 (EDT)


>>>>> "KPY" == Ka-Ping Yee <ping@lfw.org> writes:

  KPY> On Tue, 17 Apr 2001, Guido van Rossum wrote:
  >> This is one of the reasons why I didn't want to add this to the
  >> 2.1 release at such a late point.  I have no easy way to verify
  >> that this is always true, and in fact I have no idea what
  >> inspect.stack()[1][3] means. :-(

  KPY> Would you have preferred to write

  KPY>     sys._getframe().f_back.f_code.co_name

  KPY> ?  It's the same thing.

It's certainly clearer that inspect.stack()[1][3].  Does the existence
of the inspect module imply that we need to maintain its interface?
If we did, then we have some weird limits on the order of things in
stack frames.

Jeremy