未验证 提交 7c147242 编写于 作者: A Abhinav Arora 提交者: GitHub

Add default value of keyword argument to DocString (#9262)

上级 43fac872
...@@ -131,7 +131,7 @@ def make_channel(dtype, capacity=0): ...@@ -131,7 +131,7 @@ def make_channel(dtype, capacity=0):
return channel return channel
def channel_send(channel, value, copy=False): def channel_send(channel, value, is_copy=False):
""" """
Sends a value through a channel variable. Used by an unbuffered or buffered Sends a value through a channel variable. Used by an unbuffered or buffered
channel to pass data from within or to a concurrent Go block, where channel to pass data from within or to a concurrent Go block, where
...@@ -141,8 +141,8 @@ def channel_send(channel, value, copy=False): ...@@ -141,8 +141,8 @@ def channel_send(channel, value, copy=False):
channel (Variable|Channel): Channel variable created using channel (Variable|Channel): Channel variable created using
`make_channel`. `make_channel`.
value (Variable): Value to send to channel value (Variable): Value to send to channel
copy (bool): Copy data while channel send. If False, then data is_copy (bool): Copy data while channel send. If False, then data
is moved. The input cannot be used after move. is moved. The input cannot be used after move. (default False)
Returns: Returns:
Variable: The boolean status on whether or not the channel Variable: The boolean status on whether or not the channel
successfully sent the passed value. successfully sent the passed value.
...@@ -166,7 +166,7 @@ def channel_send(channel, value, copy=False): ...@@ -166,7 +166,7 @@ def channel_send(channel, value, copy=False):
X = value X = value
if copy is True: if is_copy is True:
copied_X = helper.create_variable( copied_X = helper.create_variable(
name=unique_name.generate(value.name + '_copy'), name=unique_name.generate(value.name + '_copy'),
type=value.type, type=value.type,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册