def get_open_params(cls):
"""
Returns the params for the cls.open() class method. Feel free to overwrite this in a sub-class if this default
implementation doesn't fit your protocol's needs.
:return: A list of parameter names
:rtype: list
"""
# get the arguments
# (don't use argspec because it is needlesly strict and fails on perfectly valid Cython functions)
args, varargs, varkw = inspect.getargs(cls.open.func_code)
return args[2:] # remove 'cls' and 'broker'
评论列表
文章目录