Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
pygolang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
pygolang
Commits
790189e3
Commit
790189e3
authored
Aug 27, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
golang.pyx: pychan: return cosmetics
Denote what a method returns via `# -> ...` suffix.
parent
7e55394d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
golang/_golang.pyx
golang/_golang.pyx
+2
-8
No files found.
golang/_golang.pyx
View file @
790189e3
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment