Skip to content

Instantly share code, notes, and snippets.

@chemacortes
Created June 5, 2013 13:13
Show Gist options
  • Save chemacortes/5713746 to your computer and use it in GitHub Desktop.
Save chemacortes/5713746 to your computer and use it in GitHub Desktop.
Forget about #Unicode problems on ANY Version of #Python !
# put this after the imports on your .py files
try: # py2
str, range, input = unicode, xrange, raw_input # lint:ok
except NameError: # py3
buffer, long = memoryview, int # lint:ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment