n00b question on spacing

Chris Angelico rosuav at gmail.com
Sat Jun 22 19:12:50 EDT 2013


On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson
<rantingrickjohnson at gmail.com> wrote:
>   _fmtstr = "Item wrote to MongoDB database {0}, {1}"
>   msg = _fmtstr.format(_arg1, _arg2)

As a general rule, I don't like separating format strings and their
arguments. That's one of the more annoying costs of i18n. Keep them in
a single expression if you possibly can.

ChrisA



More information about the Python-list mailing list