Re: [Python-Dev] [Python-checkins] r83890 - python/branches/py3k/Lib/inspect.py

2010-08-09 Thread Alexander Belopolsky
On Mon, Aug 9, 2010 at 11:48 AM, Benjamin Peterson wrote: > 2010/8/9 Nick Coghlan : >> On Mon, Aug 9, 2010 at 11:05 PM, benjamin.peterson >> wrote: >>> -if hasattr(sys, '_getframe'): >>> -    currentframe = sys._getframe >>> -else: >>> -    currentframe = lambda _=None: None >>> +def currentframe

Re: [Python-Dev] [Python-checkins] r83890 - python/branches/py3k/Lib/inspect.py

2010-08-09 Thread Benjamin Peterson
2010/8/9 Nick Coghlan : > On Mon, Aug 9, 2010 at 11:05 PM, benjamin.peterson > wrote: >> -if hasattr(sys, '_getframe'): >> -    currentframe = sys._getframe >> -else: >> -    currentframe = lambda _=None: None >> +def currentframe(): >> +    """Return the frame or the caller or None if this is not

Re: [Python-Dev] [Python-checkins] r83890 - python/branches/py3k/Lib/inspect.py

2010-08-09 Thread Nick Coghlan
On Mon, Aug 9, 2010 at 11:05 PM, benjamin.peterson wrote: > -if hasattr(sys, '_getframe'): > -    currentframe = sys._getframe > -else: > -    currentframe = lambda _=None: None > +def currentframe(): > +    """Return the frame or the caller or None if this is not possible.""" > +    return sys._g