Source

stuf / stuf / six.py

Diff from to

stuf/six.py

 # -*- coding: utf-8 -*-
-# pylint: disable-msg=f0401,w0613,w0631,w0622,w0122
 '''utilities for writing code that runs on Python 2 and 3'''
 
 import sys
 import types
 import operator
 try:
+    from __builtin__ import intern
     from future_builtins import filter, map, zip
+    from cPickle import loads as ld, dumps, HIGHEST_PROTOCOL
 except ImportError:
+    from sys import intern  # @UnusedImport
     from builtins import filter, map, zip  # @UnusedImport
+    from pickle import loads as ld, dumps, HIGHEST_PROTOCOL  # @UnusedImport
 try:
     import unittest2 as unittest
 except ImportError:
         from dummy_thread import get_ident
     except ImportError:
         from _thread import get_ident  # @UnusedImport
-try:
-    from __builtin__ import intern
-except ImportError:
-    from sys import intern  # @UnusedImport
-try:
-    from cPickle import loads as ld, dumps, HIGHEST_PROTOCOL
-except ImportError:
-    from pickle import loads as ld, dumps, HIGHEST_PROTOCOL  # @UnusedImport
-
-__author__ = 'Benjamin Peterson <benjamin@python.org>'
-__version__ = '1.1.0'
 
 # True if we are running on Python 3.
 PY3 = sys.version_info[0] == 3
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.