def __init__(cls, name, bases, dct):
super(MethodCollection, cls).__init__(name, bases, dct)
# Build the list of remote methods.
remote_methods = {}
for name, obj in dct.items():
if is_remote_method(obj):
if not inspect.iscoroutinefunction(obj):
raise RuntimeError("Remote method {} is not a coroutine"
.format(obj))
remote_methods[name] = obj
cls.REMOTE_METHODS = remote_methods
评论列表
文章目录