On 6/23/06, Nick Coghlan <[EMAIL PROTECTED]> wrote:
> I like the internal counter concept though - it means that purely positional
> stuff can be written without any additional mental overhead, and with the
> braces being the only additional typing when compared to the status quo.
>
> That way, if you didn't have any field formatting you wanted to do, you could
> just write:
>
>    "{} picks up the {}. It is {}!".format(person, thing, adjective)

I don't like this, as it makes it easy to fall into a localization
trap which the original programmer may have no reason to predict.
While it would be possible to add indices to the translated format
string (unlike the usual C/C++ equivalent), it would make things much
more confusing, possibly tempting constructs like "{1} ... {0} ...
{}". I doubt most translators would be intimately familiar with
Python's format specification rules.

I would much prefer the consistent explicit counter (or lookup-key) in
the format specifier.

Michael
-- 
Michael Urman  http://www.tortall.net/mu/blog
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to