summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-02-25 20:55:47 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-02-25 20:55:47 (GMT)
commit221085de89afa861c49ff4306979dbbad949d393 (patch)
tree3e79f6c14311cba733d5f8d1a1e2c227d238fd51 /Lib/pdb.py
parent27d517b21b67b54637acd19785f7adfc38fbd8c2 (diff)
downloadcpython-221085de89afa861c49ff4306979dbbad949d393.zip
cpython-221085de89afa861c49ff4306979dbbad949d393.tar.gz
cpython-221085de89afa861c49ff4306979dbbad949d393.tar.bz2
Change all the function attributes from func_* -> __*__. This gets rid
of func_name, func_dict and func_doc as they already exist as __name__, __dict__ and __doc__.
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 11135eb..4eba7bb 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -262,7 +262,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
func = getattr(self, 'do_' + cmd)
except AttributeError:
func = self.default
- if func.func_name in self.commands_resuming : # one of the resuming commands.
+ if func.__name__ in self.commands_resuming : # one of the resuming commands.
self.commands_doprompt[self.commands_bnum] = False
self.cmdqueue = []
return 1
@@ -347,7 +347,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
try:
if hasattr(func, 'im_func'):
func = func.im_func
- code = func.func_code
+ code = func.__code__
#use co_name to identify the bkpt (function names
#could be aliased, but co_name is invariant)
funcname = code.co_name
@@ -759,13 +759,13 @@ class Pdb(bdb.Bdb, cmd.Cmd):
return
code = None
# Is it a function?
- try: code = value.func_code
+ try: code = value.__code__
except: pass
if code:
print('Function', code.co_name, file=self.stdout)
return
# Is it an instance method?
- try: code = value.im_func.func_code
+ try: code = value.im_func.__code__
except: pass
if code:
print('Method', code.co_name, file=self.stdout)