[Python-3000] String formating operations in python 3k
Adam DePrince
adam.deprince at gmail.com
Tue Apr 4 04:18:20 CEST 2006
On Mon, 2006-04-03 at 14:01 -0400, Barry Warsaw wrote:
> 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.
Worse are the maintance problems when you have to change your
expression ... inside every translation of your string.
>
> -Barry
>
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/adam.deprince%40gmail.com
More information about the Python-3000
mailing list