4 ms·
I have mixed feelings about just grabbing variables inside strings. Prior to this I had a coworker that really liked using the convention: "{value}".format(*
by pfranz 6y ago
I have mixed feelings about just grabbing variables inside strings. Prior to this I had a coworker that really liked using the convention:
"{value}".format(**locals())
I thought it was clever at first, but this made refactoring really hard because you would move around these strings or variables and lose track of what's happening. Maybe IDEs are better at helping with this in recent years?