Skip to content

Commit

Permalink
Merge pull request #121 from pkol/master
Browse files Browse the repository at this point in the history
documentation ready for python3
  • Loading branch information
snaury committed Oct 16, 2017
2 parents 1a23cf9 + 74584fc commit 6fcf5e8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/greenlet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ a system, there will typically be a loop like the following one::
while not line.endswith('\n'):
line += read_next_char()
if line == 'quit\n':
print "are you sure?"
print("are you sure?")
if read_next_char() != 'y':
continue # ignore the command
process_command(line)
Expand Down Expand Up @@ -124,14 +124,14 @@ For example::
from greenlet import greenlet

def test1():
print 12
print(12)
gr2.switch()
print 34
print(34)

def test2():
print 56
print(56)
gr1.switch()
print 78
print(78)

gr1 = greenlet(test1)
gr2 = greenlet(test2)
Expand Down Expand Up @@ -199,10 +199,10 @@ information between greenlets. For example::

def test1(x, y):
z = gr2.switch(x+y)
print z
print(z)

def test2(u):
print u
print(u)
gr1.switch(42)

gr1 = greenlet(test1)
Expand Down

0 comments on commit 6fcf5e8

Please sign in to comment.