[Python-3000] String formating operations in python 3k
Barry Warsaw
barry at python.org
Mon Apr 3 20:01:07 CEST 2006
On Mon, 2006-04-03 at 10:44 -0700, Crutcher Dunnavant wrote:
> Well, what if we added '%{expression}s' as a formating type?
> This would make your example:
>
> print _("%{user}s is not a member of the %{listname}s mailing list")
>
> or even:
>
> print _("%{utils.websafe(form.get('user'))}s is not a member of the
> %{mlist.get_name()}s mailing list")
I wouldn't use it because it would be way too easy for translators to
make catastrophic mistakes.
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-3000/attachments/20060403/3a7c4c90/attachment.pgp
More information about the Python-3000
mailing list