diff options
Diffstat (limited to 'third_party/python/pyasn1/pyasn1/compat/calling.py')
-rw-r--r-- | third_party/python/pyasn1/pyasn1/compat/calling.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/third_party/python/pyasn1/pyasn1/compat/calling.py b/third_party/python/pyasn1/pyasn1/compat/calling.py new file mode 100644 index 0000000000..778a3d15d0 --- /dev/null +++ b/third_party/python/pyasn1/pyasn1/compat/calling.py @@ -0,0 +1,20 @@ +# +# This file is part of pyasn1 software. +# +# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> +# License: http://snmplabs.com/pyasn1/license.html +# +from sys import version_info + +__all__ = ['callable'] + + +if (2, 7) < version_info[:2] < (3, 2): + import collections + + def callable(x): + return isinstance(x, collections.Callable) + +else: + + callable = callable |