Ver Fonte

Describe the expectations of input arguments and return values

Lidi Zheng há 6 anos atrás
pai
commit
7eeab2a23c
1 ficheiros alterados com 8 adições e 0 exclusões
  1. 8 0
      src/python/grpcio/grpc/experimental/__init__.py

+ 8 - 0
src/python/grpcio/grpc/experimental/__init__.py

@@ -85,6 +85,14 @@ def wrap_server_method_handler(wrapper, handler):
     The server implementation requires all server handlers being wrapped as
     The server implementation requires all server handlers being wrapped as
     RpcMethodHandler objects. This helper function ease the pain of writing
     RpcMethodHandler objects. This helper function ease the pain of writing
     server handler wrappers.
     server handler wrappers.
+
+    Args:
+        wrapper: A wrapper function that takes in a method handler behavior
+          (the actual function) and returns a wrapped function.
+        handler: A RpcMethodHandler object to be wrapped.
+
+    Returns:
+        A newly created RpcMethodHandler.
     """
     """
     if not handler:
     if not handler:
         return None
         return None