mirror of
https://github.com/python/cpython.git
synced 2025-10-12 01:43:12 +00:00
don't alias directly, so that extra arguments don't appear #6678
This commit is contained in:
parent
a492362f9a
commit
42ac47548d
1 changed files with 3 additions and 4 deletions
|
@ -1062,10 +1062,9 @@ def getinnerframes(tb, context=1):
|
||||||
tb = tb.tb_next
|
tb = tb.tb_next
|
||||||
return framelist
|
return framelist
|
||||||
|
|
||||||
if hasattr(sys, '_getframe'):
|
def currentframe():
|
||||||
currentframe = sys._getframe
|
"""Return the frame or the caller or None if this is not possible."""
|
||||||
else:
|
return sys._getframe(1) if hasattr(sys, "_getframe") else None
|
||||||
currentframe = lambda _=None: None
|
|
||||||
|
|
||||||
def stack(context=1):
|
def stack(context=1):
|
||||||
"""Return a list of records for the stack above the caller's frame."""
|
"""Return a list of records for the stack above the caller's frame."""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue