Index: inspect.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/inspect.py,v retrieving revision 1.49 diff -c -r1.49 inspect.py *** inspect.py 1 Dec 2003 20:12:15 -0000 1.49 --- inspect.py 5 Jun 2004 12:59:44 -0000 *************** *** 740,751 **** The optional second argument specifies the number of lines of context to return, which are centered around the current line.""" if istraceback(frame): frame = frame.tb_frame if not isframe(frame): raise TypeError('arg is not a frame or traceback object') filename = getsourcefile(frame) or getfile(frame) - lineno = frame.f_lineno if context > 0: start = lineno - 1 - context//2 try: --- 740,753 ---- The optional second argument specifies the number of lines of context to return, which are centered around the current line.""" if istraceback(frame): + lineno = frame.tb_lineno frame = frame.tb_frame + else: + lineno = frame.f_lineno if not isframe(frame): raise TypeError('arg is not a frame or traceback object') filename = getsourcefile(frame) or getfile(frame) if context > 0: start = lineno - 1 - context//2 try: Index: test/test_inspect.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_inspect.py,v retrieving revision 1.13 diff -c -r1.13 test_inspect.py *** test/test_inspect.py 31 Oct 2003 15:35:53 -0000 1.13 --- test/test_inspect.py 5 Jun 2004 12:59:44 -0000 *************** *** 158,165 **** istest(inspect.isframe, 'mod.fr') test(len(git.tr) == 3, 'trace() length') ! test(git.tr[0][1:] == (TESTFN, 46, 'argue', ! [' self.tr = inspect.trace()\n'], 0), 'trace() row 2') test(git.tr[1][1:] == (TESTFN, 9, 'spam', [' eggs(b + d, c + f)\n'], 0), 'trace() row 2') --- 158,165 ---- istest(inspect.isframe, 'mod.fr') test(len(git.tr) == 3, 'trace() length') ! test(git.tr[0][1:] == (TESTFN, 43, 'argue', ! [' spam(a, b, c)\n'], 0), 'trace() row 2') test(git.tr[1][1:] == (TESTFN, 9, 'spam', [' eggs(b + d, c + f)\n'], 0), 'trace() row 2')