isso/isso/compat.py
2013-10-29 12:01:45 +01:00

23 lines
374 B
Python

# -*- encoding: utf-8 -*-
import sys
PY2K = sys.version_info[0] == 2
if not PY2K:
map, zip, filter = map, zip, filter
text_type = str
string_types = (str, )
buffer = memoryview
else:
from itertools import imap, izip, ifilter
map, zip, filter = imap, izip, ifilter
text_type = unicode
string_types = (str, unicode)
buffer = buffer