chiark
/
gitweb
/
~mdw
/
hippotat
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
d2e727c287e8259d29080e99b786e909e5cb3e66
[hippotat]
/
test.py
1
#!/usr/bin/python3
2
3
from functools import partial
4
5
def hi(th, x):
6
print('hi %s %s' % (th, x))
7
8
def rt():
9
global g
10
g = { }
11
while len(g) < 3:
12
newthing = object()
13
newfunc = partial(hi, newthing)
14
g[newthing] = newfunc
15
16
rt()
17
print(repr(g))
18
for v in g.values():
19
v(24)