diff options
author | Collin Winter <collinw@gmail.com> | 2007-07-17 20:59:35 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-07-17 20:59:35 (GMT) |
commit | 6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (patch) | |
tree | 5e172400da7561eb4bb8fafc62c8cab511d74dad /Demo/threads/fcmp.py | |
parent | a8c360ee76fb76902a2e2140fbb38d4b06b2d9fb (diff) | |
download | cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.zip cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.gz cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.bz2 |
Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
Diffstat (limited to 'Demo/threads/fcmp.py')
-rw-r--r-- | Demo/threads/fcmp.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Demo/threads/fcmp.py b/Demo/threads/fcmp.py index 27af76d..bc2e3ed 100644 --- a/Demo/threads/fcmp.py +++ b/Demo/threads/fcmp.py @@ -16,10 +16,10 @@ def printinorder(list): f = co.create(fringe, co, list) try: while 1: - print co.tran(f), + print(co.tran(f), end=' ') except EarlyExit: pass - print + print() printinorder([1,2,3]) # 1 2 3 printinorder([[[[1,[2]]],3]]) # ditto @@ -49,16 +49,16 @@ def fcmp(l1, l2): co1.kill(); co2.kill() return cmp(v1,v2) -print fcmp(range(7), x) # 0; fringes are equal -print fcmp(range(6), x) # -1; 1st list ends early -print fcmp(x, range(6)) # 1; 2nd list ends early -print fcmp(range(8), x) # 1; 2nd list ends early -print fcmp(x, range(8)) # -1; 1st list ends early -print fcmp([1,[[2],8]], - [[[1],2],8]) # 0 -print fcmp([1,[[3],8]], - [[[1],2],8]) # 1 -print fcmp([1,[[2],8]], - [[[1],2],9]) # -1 +print(fcmp(range(7), x)) # 0; fringes are equal +print(fcmp(range(6), x)) # -1; 1st list ends early +print(fcmp(x, range(6))) # 1; 2nd list ends early +print(fcmp(range(8), x)) # 1; 2nd list ends early +print(fcmp(x, range(8))) # -1; 1st list ends early +print(fcmp([1,[[2],8]], + [[[1],2],8])) # 0 +print(fcmp([1,[[3],8]], + [[[1],2],8])) # 1 +print(fcmp([1,[[2],8]], + [[[1],2],9])) # -1 # end of example |