3 ms·
I was just using the locals() to show equivalence. I think I've done that maybe a handful of times in production code, and it was always an already hairy templa
by emidln 10y ago
I was just using the locals() to show equivalence. I think I've done that maybe a handful of times in production code, and it was always an already hairy templating situation. Most of the time, I see:
"{} world!".format('hello')
or
"{greeting} world!".format(greeting='hello')
There is a huge value in Python's historical approach of straightforward code built on a relatively small foundation. f-strings are another example of the Python I fell in love with growing up/moving on.