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

Mike Miller python-ideas at mgmiller.net
Mon Aug 10 22:31:58 CEST 2015


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



More information about the Python-ideas mailing list