2017-12-11 05:35:41 +03:00
|
|
|
import sys
|
|
|
|
|
2019-02-02 22:21:39 +03:00
|
|
|
__all__ = ['string_types', 'text_type', 'lru_cache']
|
|
|
|
|
2017-12-11 05:35:41 +03:00
|
|
|
if sys.version_info[0] == 2:
|
|
|
|
# Python 2
|
2019-03-16 19:51:16 +03:00
|
|
|
PY2 = True
|
|
|
|
PY3 = False
|
2017-12-11 05:35:41 +03:00
|
|
|
string_types = basestring,
|
|
|
|
text_type = unicode
|
2019-02-02 22:21:39 +03:00
|
|
|
from ._lru_cache import lru_cache
|
|
|
|
|
2017-12-11 05:35:41 +03:00
|
|
|
else:
|
|
|
|
# Python 3
|
2019-03-16 19:51:16 +03:00
|
|
|
PY2 = False
|
|
|
|
PY3 = True
|
2017-12-11 05:35:41 +03:00
|
|
|
string_types = str,
|
|
|
|
text_type = str
|
2019-02-02 22:21:39 +03:00
|
|
|
from functools import lru_cache
|