hy/hy/_compat.py

17 lines
389 B
Python
Raw Normal View History

2020-01-03 13:47:51 -05:00
# Copyright 2020 the authors.
# This file is part of Hy, which is free software licensed under the Expat
# license. See the LICENSE.
2013-04-04 19:32:56 -04:00
2019-05-20 16:13:07 -04:00
import sys
2013-04-12 20:39:45 +02:00
2017-12-30 17:31:06 -05:00
PY36 = sys.version_info >= (3, 6)
2018-02-09 16:43:25 -05:00
PY37 = sys.version_info >= (3, 7)
PY38 = sys.version_info >= (3, 8)
2013-04-12 20:39:45 +02:00
2019-05-20 15:43:39 -04:00
def reraise(exc_type, value, traceback=None):
try:
raise value.with_traceback(traceback)
finally:
traceback = None