Shorten hy._compat

This commit is contained in:
Kodi Arfer 2017-04-13 16:13:03 -07:00
parent ef3bad7e03
commit 5aaa7d92d8

View File

@ -43,25 +43,10 @@ PY33 = sys.version_info >= (3, 3)
PY34 = sys.version_info >= (3, 4)
PY35 = sys.version_info >= (3, 5)
if PY3:
str_type = str
else:
str_type = unicode # NOQA
if PY3:
bytes_type = bytes
else:
bytes_type = str
if PY3:
long_type = int
else:
long_type = long # NOQA
if PY3:
string_types = str,
else:
string_types = basestring, # NOQA
str_type = str if PY3 else unicode # NOQA
bytes_type = bytes if PY3 else str # NOQA
long_type = int if PY3 else long # NOQA
string_types = str if PY3 else basestring # NOQA
if PY3:
exec('def raise_empty(t, *args): raise t(*args) from None')