Commits

Ronald Oussoren  committed e9ed45e

Little tweak to make it clearer what's imported when

  • Participants
  • Parent commits 19b8f31

Comments (0)

Files changed (1)

File pyobjc-core/Lib/objc/_pycoder.py

 import objc
 from types import *
 
-try:
+if sys.version_info[0] == 2:
+    import copy_reg as copyreg
+else:
     import copyreg
-except ImportError:  # pragma: no 3.x cover
-    import copy_reg as copyreg
 
 import copy
 
 from pickle import PicklingError, UnpicklingError
 
-try:
+if sys.version_info[0] == 2:
+    import __builtin__ as _builtins
+else:
     import builtins as _builtins
-except ImportError: # pragma: no 3.x cover
-    import __builtin__ as _builtins
 
 # _getattribute and whichmodule are adapted from the
 # same function's in Python 3.4's pickle module. The