From: Ian Jackson Date: Sat, 1 Apr 2017 23:43:05 +0000 (+0100) Subject: less absurd X-Git-Tag: hippotat/1.0.0~55^2~144 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=hippotat.git;a=commitdiff_plain;h=697be73ae820a076f6803820038c830dec3c966d less absurd --- diff --git a/test.py b/test.py index e1a1568..d2e727c 100755 --- 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()