summaryrefslogtreecommitdiffhomepage
path: root/libs/enzyme/compat.py
blob: 81e3a4c9de579e4746d64fe490ae32564ef9f013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- coding: utf-8 -*-
import sys


_ver = sys.version_info
is_py3 = _ver[0] == 3
is_py2 = _ver[0] == 2


if is_py2:
    bytes = lambda x: chr(x[0])  # @ReservedAssignment
elif is_py3:
    bytes = bytes  # @ReservedAssignment