hy/hy/_compat.py

17 lines
389 B
Python
Raw Permalink Normal View History

2020-01-03 19:47:51 +01: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-05 01:32:56 +02:00
2019-05-20 22:13:07 +02:00
import sys
2013-04-12 20:39:45 +02:00
2017-12-30 23:31:06 +01:00
PY36 = sys.version_info >= (3, 6)
2018-02-09 22:43:25 +01:00
PY37 = sys.version_info >= (3, 7)
PY38 = sys.version_info >= (3, 8)
2013-04-12 20:39:45 +02:00
2019-05-20 21:43:39 +02:00
def reraise(exc_type, value, traceback=None):
try:
raise value.with_traceback(traceback)
finally:
traceback = None