25 Aug
2015
25 Aug
'15
11:52 a.m.
On 24 August 2015 at 22:00, Steven D'Aprano
I mean, I know how to get a closure in general terms, e.g.:
[(lambda : i) for i in range(10)]
but I'm not seeing where you would get a closure *specifically* in this situation with your defer function.
I was wrong when I though you could do this trick with f-strings - you need the delayed interpolation offered by PEP 501's i-strings in order to access the original objects directly. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia