[Python-3000] i18n prefix

Barry Warsaw barry at python.org
Tue Apr 17 16:02:58 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Apr 17, 2007, at 1:35 AM, Humberto Diogenes wrote:

>    This is my first post to python-3000. After Guido PEPs-deadline
> announcement, I decided to discuss an old idea while it still has
> some chance of being accepted. :)
>
>    No, I do not want i18n identifiers. What I'd like to propose is a
> standard syntax for i18n strings. Something like:
>    print i"my string"
>
>    My points are:
>    * i18n is everywhere (or is it the other way around? :-)
>    * Python has a tradition of incorporating good practices
>    * _ = gettext.gettext; print _("my string") isn't very nice
>
>    So, do you think that something like i"my string" would be better
> than _("my string")? Would it add unnecessary complexity to Python?

I've never understood the desire for an i-prefix, though it comes up  
often.  In py3k you won't have u-prefixes, but you'll still have r- 
prefixes (I'm assuming), so while you'll have less prefix-explosion,  
I still don't see much benefit in adding a prefix for something that  
is perfectly well handled by a function call.  Besides, if you used a  
prefix you'd have to explain how the run-time aspects of translations  
will get handled.  Definitely PEP material.

- -Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iQCVAwUBRiTTknEjvBPtnXfVAQKfiwP/WIxeq+iG1hXVYikH4vy6pkHHT96zsxRv
tJ9aYuhLOFDmWkhsXpiRsSnPzPMXvth3UHiHCYo+D1aOEUyHyqCAZ97iHcvD+N7T
PDycmWGl5dEaOBJ3ieXVV+0Bbv3i+J6QpA1Aj1QdS5o6pkB31STdt+3OPG2eKEiz
SQKG+YrpgAI=
=cR8m
-----END PGP SIGNATURE-----


More information about the Python-3000 mailing list