Created
June 5, 2013 13:13
-
-
Save chemacortes/5713746 to your computer and use it in GitHub Desktop.
Forget about #Unicode problems on ANY Version of #Python !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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