summaryrefslogtreecommitdiffstats
path: root/Demo/threads
diff options
context:
space:
mode:
authorMartin Blais <blais@furius.ca>2006-06-06 12:46:55 (GMT)
committerMartin Blais <blais@furius.ca>2006-06-06 12:46:55 (GMT)
commit215f13dd118f67fb8c3d3663dbbe11ed33691c4f (patch)
treeb7bb6619005efdc2fb00c9e1b912fc0e75dc2be4 /Demo/threads
parent07347d6efc84f06e65c0e55b8906a8e6579bfc4a (diff)
downloadcpython-215f13dd118f67fb8c3d3663dbbe11ed33691c4f.zip
cpython-215f13dd118f67fb8c3d3663dbbe11ed33691c4f.tar.gz
cpython-215f13dd118f67fb8c3d3663dbbe11ed33691c4f.tar.bz2
Normalized a few cases of whitespace in function declarations.
Found them using:: find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done (I was doing this all over my own code anyway, because I'd been using spaces in all defs, so I thought I'd make a run on the Python code as well. If you need to do such fixes in your own code, you can use xx-rename or parenregu.el within emacs.)
Diffstat (limited to 'Demo/threads')
-rw-r--r--Demo/threads/fcmp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Demo/threads/fcmp.py b/Demo/threads/fcmp.py
index 83ebe01..27af76d 100644
--- a/Demo/threads/fcmp.py
+++ b/Demo/threads/fcmp.py
@@ -4,14 +4,14 @@ from Coroutine import *
# fringe visits a nested list in inorder, and detaches for each non-list
# element; raises EarlyExit after the list is exhausted
-def fringe( co, list ):
+def fringe(co, list):
for x in list:
if type(x) is type([]):
fringe(co, x)
else:
co.back(x)
-def printinorder( list ):
+def printinorder(list):
co = Coroutine()
f = co.create(fringe, co, list)
try:
@@ -27,7 +27,7 @@ x = [0, 1, [2, [3]], [4,5], [[[6]]] ]
printinorder(x) # 0 1 2 3 4 5 6
# fcmp lexicographically compares the fringes of two nested lists
-def fcmp( l1, l2 ):
+def fcmp(l1, l2):
co1 = Coroutine(); f1 = co1.create(fringe, co1, l1)
co2 = Coroutine(); f2 = co2.create(fringe, co2, l2)
while 1: