On Tue, Jul 6, 2021 at 9:39 AM Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > > On 6/07/21 9:56 am, Jim Baker wrote: > > > > d = deferred_tag"Some expr: {:(x*2)}" > > > > All that is happening here is that this being wrapped in a lambda, which > > captures any scope lexically as usual. > > Is there reason to think this will be a common enough requirement > to justify having an abbreviated syntax for a parameterless lambda > that's only available in template expressions? >
If it's just being wrapped in a lambda function, probably nothing, but I think that that would be *very* surprising behaviour. People will expect that the expressions' values will be collected at the point you hit the interpolated string, not later when it gets used. ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/T5QSTL4UQQJH74ZGSV3D76PBVTSUCDI2/ Code of Conduct: http://python.org/psf/codeofconduct/