Marking translatable strings

François Pinard pinard at iro.umontreal.ca
Sun Sep 19 14:25:16 EDT 1999


Robin Becker <robin at jessikat.demon.co.uk> écrit:

> More generally wouldn't one need to allow for quoted strings prefixed
> by either nothing, r or t or rt or tr and if that's the case why stop
> at only three prefix symbols (counting empty).

Hello, Robin.  I do not know why, but I'm not much attracted to letter
prefixes.

A `t' prefix would represent a change to Python, and changing Python might
be prematurate, still.  Also, translatibility of a string does not really
change the string own contents, so might not be worth a prefix.  The `r'
prefix is different, it does change how the string is read.

But you really want that the interpreter itself to obtain the translation
on the fly?  Then it would be be a nicer story, and might give a better
value to such a `t' prefix.  I'm not sure.  Even if I much like the `r'
feature, I do not much like its syntax: a letter prefix to a string makes
the string a bit less legible, in my opinion.  On the other hand, abusing
non-letter prefixes might lead Python to look like Perl, after a while :-).

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list