chiark / gitweb /
remove example demonstrating daft variable scoping/lifetime
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 Apr 2017 12:05:41 +0000 (13:05 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 Apr 2017 12:05:41 +0000 (13:05 +0100)
test.py [deleted file]

diff --git a/test.py b/test.py
deleted file mode 100755 (executable)
index d2e727c..0000000
--- a/test.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/python3
-
-from functools import partial
-
-def hi(th, x):
-  print('hi %s %s' % (th, x))
-
-def rt():
-  global g
-  g = { }
-  while len(g) < 3:
-    newthing = object()
-    newfunc = partial(hi, newthing)
-    g[newthing] = newfunc
-
-rt()
-print(repr(g))
-for v in g.values():
-  v(24)