]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/support/funcutils.py
Vendor import of lldb trunk r290819:
[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
12 def requires_self(func):
13     func_argc = len(inspect.getargspec(func).args)
14     if func_argc == 0 or (
15         getattr(
16             func,
17             'im_self',
18             None) is not None) or (
19             hasattr(
20                 func,
21                 '__self__')):
22         return False
23     else:
24         return True