<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Fri, Mar 1, 2013, at 11:55, 김용빈 wrote:<br></div>
<blockquote type="cite"><div dir="ltr">why we bother with '{variable}'.format(variable=variable) ?<div style="">can we just '{variable}.format()' ?<br></div>
<div style=""> </div>
<div style="">if variable is exist, then assign it.<br></div>
<div style="">
if variable is not exist, then raise error<br></div>
<div style=""> </div>
<div style="">I am not language expert. so sorry if this is not a good idea, or already discussed.<br></div>
</div>
<div><u>_______________________________________________</u><br></div>
<div>Python-ideas mailing list<br></div>
<div><a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br></div>
<div><a href="http://mail.python.org/mailman/listinfo/python-ideas">http://mail.python.org/mailman/listinfo/python-ideas</a><br></div>
</blockquote><div> </div>
<div class="signature sig2805171"> </div>
<div>If you don't want to repeat a name multiple times, just use '{0}'.format(variable)<br></div>
<div> </div>
<div>The format function doesn't (i think?) have a way to see your local variables to look up the name.</div>
<div> </div>
</body>
</html>