summaryrefslogtreecommitdiff
path: root/Cython/Compiler/Future.py
blob: c42e595f074c3e7d6dc60056cbc519fd42dd77cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
def _get_feature(name):
    import __future__
    try:
        return getattr(__future__, name)
    except AttributeError:
        # unique fake object for earlier Python versions
        return object()

unicode_literals = _get_feature("unicode_literals")
with_statement = _get_feature("with_statement")
division = _get_feature("division")

del _get_feature