Kaydet (Commit) c4448659 authored tarafından Guido van Rossum's avatar Guido van Rossum

No longer need to use codehack -- use co.co_firstlineno instead.

üst 2deb73a9
...@@ -112,7 +112,6 @@ class Pdb(bdb.Bdb, cmd.Cmd): ...@@ -112,7 +112,6 @@ class Pdb(bdb.Bdb, cmd.Cmd):
filename = self.curframe.f_code.co_filename filename = self.curframe.f_code.co_filename
except: except:
# Try function name as the argument # Try function name as the argument
import codehack
try: try:
func = arg func = arg
if hasattr(func, 'im_func'): if hasattr(func, 'im_func'):
...@@ -122,7 +121,7 @@ class Pdb(bdb.Bdb, cmd.Cmd): ...@@ -122,7 +121,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
print '*** The specified object', print '*** The specified object',
print 'is not a function', arg print 'is not a function', arg
return return
lineno = codehack.getlineno(code) lineno = code.co_firstlineno
filename = code.co_filename filename = code.co_filename
# now set the break point # now set the break point
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment