Files
opensearch-pyd/elasticsearch/compat.py
T

14 lines
312 B
Python
Raw Normal View History

2014-02-21 16:53:56 +01:00
import sys
PY2 = sys.version_info[0] == 2
if PY2:
string_types = basestring,
from urllib import quote_plus, urlencode
2014-11-13 11:47:54 +01:00
from urlparse import urlparse
2014-02-21 16:53:56 +01:00
from itertools import imap as map
else:
string_types = str, bytes
2014-11-13 11:47:54 +01:00
from urllib.parse import quote_plus, urlencode, urlparse
2014-02-21 16:53:56 +01:00
map = map