Server IP : 184.154.167.98 / Your IP : 52.15.190.187 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/pydbus/ |
Upload File : |
from collections import OrderedDict from inspect import getargspec class _empty: pass class Signature: empty = _empty def __init__(self, parameters=None, return_annotation=_empty): self.parameters = OrderedDict(((param.name, param) for param in parameters)) self.return_annotation = return_annotation class Parameter: empty = _empty POSITIONAL_ONLY = 0 POSITIONAL_OR_KEYWORD = 1 KEYWORD_ONLY = 999 def __init__(self, name, kind, default=_empty, annotation=_empty): self.name = name self.kind = kind self.annotation = annotation def signature(f): parameters = [Parameter(arg, Parameter.POSITIONAL_OR_KEYWORD) for arg in getargspec(f).args] return Signature(parameters = parameters)