Commit 9f3e5ceb by Marius Gedminas

Make sure 'basestring', 'bytes' and 'unicode' are defined

Python 3 doesn't have 'basestring' and 'unicode'.

Python 2.4 doesn't have 'bytes'
parent f7571cb3
......@@ -74,6 +74,22 @@ except ImportError:
imap = map # Python 3
try:
basestring
except NameError:
basestring = str # Python 3
try:
unicode
except NameError:
unicode = str # Python 3
try:
bytes
except NameError:
bytes = str # Python 2
try:
import json
# Detect the python-json library which is incompatible
# Look for simplejson if that's the case
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment