Files
opensearch-pyd/elasticsearch/compat.py
T

15 lines
315 B
Python
Raw Normal View History

2014-02-21 16:53:56 +01:00
import sys
PY2 = sys.version_info[0] == 2
if PY2:
u = lambda s: s.decode('utf-8')
string_types = basestring,
from urllib import quote_plus, urlencode
from itertools import imap as map
else:
u = str
string_types = str, bytes
from urllib.parse import quote_plus, urlencode
map = map