chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e8ed002
)
absurd
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 23:42:46 +0000
(
00:42
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 23:42:46 +0000
(
00:42
+0100)
test.py
[new file with mode: 0755]
patch
|
blob
diff --git a/test.py
b/test.py
new file mode 100755
(executable)
index 0000000..
e1a1568
--- /dev/null
+++ b/
test.py
@@ -0,0
+1,17
@@
+#!/usr/bin/python3
+
+def hi(th, x):
+ print('hi %s %s' % (th, x))
+
+def rt():
+ global g
+ g = { }
+ while len(g) < 3:
+ newthing = object()
+ newfunc = lambda x: hi(newthing, x)
+ g[newthing] = newfunc
+
+rt()
+print(repr(g))
+for v in g.values():
+ v(24)