Are there any disadvantages, caveats or bad practice warnings about using the following pattern?
def buildString(user, name = \'john\', age=22):
userId =
This is very old, but if you find yourself using .format
the one caveat I have encountered with passing in **locals
is that if you don't have that variable defined anywhere, it will break. Explicitly stating what variables are passed in will avoid this in most modern IDEs.
foo = "bar"
"{foo} and {baz} are pair programming".format(**locals())