summaryrefslogtreecommitdiff
path: root/pyasn1/compat/calling.py
blob: 0b2c4643b35d6cbe2947c9b6c9fd82f6a14933a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# This file is part of pyasn1 software.
#
# Copyright (c) 2005-2017, Ilya Etingof <etingof@gmail.com>
# License: http://pyasn1.sf.net/license.html
#
from sys import version_info

__all__ = ['callable']


if (2, 7) < version_info[:2] < (3, 2):
    import collections

    callable = lambda x: isinstance(x, collections.Callable)

else:

    callable = callable