Skip to content

Instantly share code, notes, and snippets.

@shinux
Created December 28, 2015 02:33
Show Gist options
  • Save shinux/72eae33a3a737021ca3f to your computer and use it in GitHub Desktop.
Save shinux/72eae33a3a737021ca3f to your computer and use it in GitHub Desktop.
simple2to3
if PY3:
string_types = str,
integer_types = int,
text_type = str
xrange = range
else:
string_types = basestring,
integer_types = (int, long)
text_type = unicode
xrange = xrange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment