chiark / gitweb /
init debug
[hippotat.git] / test.py
diff --git a/test.py b/test.py
index e1a15680663d37e39835087ec2b9a0be1aa20076..d2e727c287e8259d29080e99b786e909e5cb3e66 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -1,5 +1,7 @@
 #!/usr/bin/python3
 
+from functools import partial
+
 def hi(th, x):
   print('hi %s %s' % (th, x))
 
@@ -8,7 +10,7 @@ def rt():
   g = { }
   while len(g) < 3:
     newthing = object()
-    newfunc = lambda x: hi(newthing, x)
+    newfunc = partial(hi, newthing)
     g[newthing] = newfunc
 
 rt()