[Python-ideas] PEP 501 - i18n with marked strings

Sven R. Kunze srkunze at mail.de
Tue Aug 11 09:36:25 CEST 2015


Also bare with me but couldn't i18n not just be another format spec?

i'Hello there, {name:i18n} {age}.'



On 10.08.2015 22:31, Mike Miller wrote:
> Hi,
>
> I haven't done i18n recently, so bare with me.  I'm not sure about 
> bolting this on to "format strings", in that it feels like an 
> orthogonal concept.
>
> However, what if we had i18n strings as well, not instead of:
>
>     i'Hello there, $name {age}.'
>
> and that they were complimentary to f'', each handling their different 
> duties:
>
>     fi'Hello there, $name {age}.'
>
> Different syntax would probably be needed for each, is that correct?  
> Since each have different requirements, e.g. Barry's concerns about 
> format strings being too powerful for non-developers, while also 
> making a project vulnerable to arbitrary code.
>
> Perhaps PEP 498 with non-arbitrary strings (but attribute/keys 
> support) would allow the syntax to be unified.
>
> -Mike
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/



More information about the Python-ideas mailing list