Upgrade to Python 3.9.1 [Windows]

http: //fusion/573206f1-ac79-4e82-b01b-dd1480498170
Change-Id: I13e6ff8bd8fe6073ebaadbf3f7c3f2967543d61b
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 0810235..d7d9571 100644
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -1312,14 +1312,6 @@
             # _getval() already printed the error
             return
         code = None
-        # Is it a function?
-        try:
-            code = value.__code__
-        except Exception:
-            pass
-        if code:
-            self.message('Function %s' % code.co_name)
-            return
         # Is it an instance method?
         try:
             code = value.__func__.__code__
@@ -1328,6 +1320,14 @@
         if code:
             self.message('Method %s' % code.co_name)
             return
+        # Is it a function?
+        try:
+            code = value.__code__
+        except Exception:
+            pass
+        if code:
+            self.message('Function %s' % code.co_name)
+            return
         # Is it a class?
         if value.__class__ is type:
             self.message('Class %s.%s' % (value.__module__, value.__qualname__))