3 ms·
I think you're right that Interpy and PEP 498 have a different, earlier binding strategy than say does. I've found the late / local binding of say() and fmt() c
by jonathaneunice 11y ago
I think you're right that Interpy and PEP 498 have a different, earlier binding strategy than say does. I've found the late / local binding of say() and fmt() convenient. Are there use cases where that earlier binding is valuable or critical?
Your example highlights the binding strategy, but more typical would be:
>>> def test(x=1):
... return fmt("{x}")
...
>>> test()
'1'
>>> test(12)
'12'
>>> test('woobers')
'woobers'