1. Tyler Wade
  2. pypy

Commits

Tyler Wade  committed 83e5575

Code cleanup (stray print, bad variable name, and bare except)

  • Participants
  • Parent commits c8d597c
  • Branches default

Comments (0)

Files changed (3)

File pypy/interpreter/pycode.py

View file
     def remove_docstrings(self, space):
         if self.co_flags & CO_KILL_DOCSTRING:
             self.co_consts_w[0] = space.w_None
-        for co_w in self.co_consts_w:
+        for w_co in self.co_consts_w:
             if isinstance(co_w, PyCode):
-                co_w.remove_docstrings(space)
+                w_co.remove_docstrings(space)
 
     def _to_code(self):
         """For debugging only."""

File pypy/module/__pypy__/interp_magic.py

View file
 
 @unwrap_spec(debug=bool)
 def set_debug(space, debug):
-    print debug
     space.sys.debug = debug
     space.setitem(space.builtin.w_dict,
                   space.wrap('__debug__'),

File pypy/module/imp/importing.py

View file
 
     try:
         optimize = space.sys.get_flag('optimize')
-    except:
+    except Exception:
         optimize = 0
     if optimize >= 2:
         code_w.remove_docstrings(space)
     code_w = read_compiled_module(space, cpathname, source)
     try:
         optimize = space.sys.get_flag('optimize')
-    except:
+    except Exception:
         optimize = 0
     if optimize >= 2:
         code_w.remove_docstrings(space)