Commit 790189e3 authored by Kirill Smelkov's avatar Kirill Smelkov

golang.pyx: pychan: return cosmetics

Denote what a method returns via `# -> ...` suffix.
parent 7e55394d
...@@ -270,8 +270,6 @@ class pychan(object): ...@@ -270,8 +270,6 @@ class pychan(object):
ch._closed = False ch._closed = False
# send sends object to a receiver. # send sends object to a receiver.
#
# .send(obj)
def send(ch, obj): def send(ch, obj):
if ch is pynilchan: if ch is pynilchan:
_blockforever() _blockforever()
...@@ -297,9 +295,7 @@ class pychan(object): ...@@ -297,9 +295,7 @@ class pychan(object):
# #
# ok is true - if receive was delivered by a successful send. # ok is true - if receive was delivered by a successful send.
# ok is false - if receive is due to channel being closed and empty. # ok is false - if receive is due to channel being closed and empty.
# def recv_(ch): # -> (rx, ok)
# .recv_() -> (rx, ok)
def recv_(ch):
if ch is pynilchan: if ch is pynilchan:
_blockforever() _blockforever()
...@@ -320,9 +316,7 @@ class pychan(object): ...@@ -320,9 +316,7 @@ class pychan(object):
return me.rx_ return me.rx_
# recv receives from the channel. # recv receives from the channel.
# def recv(ch): # -> rx
# .recv() -> rx
def recv(ch):
rx, _ = ch.recv_() rx, _ = ch.recv_()
return rx return rx
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment