1 Mar
2013
1 Mar
'13
6:51 p.m.
On Fri, Mar 1, 2013 at 11:55 AM, 김용빈
why we bother with '{variable}'.format(variable=variable) ? can we just '{variable}.format()' ?
variable = "Hello, World!" print('{variable}'.format_map(locals()))
if variable is exist, then assign it. if variable is not exist, then raise error
I am not language expert. so sorry if this is not a good idea, or already discussed.
As Dustin said, Explicit is Better Than Implicit; you don't want a variable to accidentally make your string formatting work by luck because you forgot to pass in an argument you meant to but just so happened to have a variable with the "right" name.