summaryrefslogtreecommitdiff
path: root/lib/compat.py
blob: 185b8f64a2e3610414d70ea33f0e01af18a7914d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import sys

__all__ = ['string_types', 'text_type', 'lru_cache']

if sys.version_info[0] == 2:
    # Python 2
    string_types = basestring,
    text_type = unicode
    from ._lru_cache import lru_cache

else:
    # Python 3
    string_types = str,
    text_type = str
    from functools import lru_cache