]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/support/funcutils.py
Vendor import of lldb release_39 branch r276489:
[FreeBSD/FreeBSD.git] / packages / Python / lldbsuite / support / funcutils.py
1 from __future__ import print_function
2 from __future__ import absolute_import
3
4 # System modules
5 import inspect
6
7 # Third-party modules
8
9 # LLDB modules
10
11 def requires_self(func):
12     func_argc = len(inspect.getargspec(func).args)
13     if func_argc == 0 or (getattr(func,'im_self', None) is not None) or (hasattr(func, '__self__')):
14         return False
15     else:
16         return True