summaryrefslogtreecommitdiff
path: root/pyasn1/compat/calling.py
blob: c60b50d8d6226a0981d5c85fcfd4737fe6ba9c51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# This file is part of pyasn1 software.
#
# Copyright (c) 2005-2018, 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