diff Lib/pdb.py @ 40910:eaaee785eb86

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__.
author Neal Norwitz <nnorwitz@gmail.com>
date Sun, 25 Feb 2007 20:55:47 +0000
parents 81e4034ad883
children 06145fbc7ab9
line wrap: on
line diff
--- a/Lib/pdb.py	Sun Feb 25 20:39:11 2007 +0000
+++ b/Lib/pdb.py	Sun Feb 25 20:55:47 2007 +0000
@@ -262,7 +262,7 @@
             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 @@
                 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 @@
             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)