>> See also PEP 501, which could be used for i18n. > > I don't see how this immediately helps the OP, who wants a *literal* > expression that automatically invokes the translation machinery as > well as the interpolation machinery.
Another way forward could be a preprocessor. All this can be done with a fairly simple script using parso. If the op is interested I could whip out a prototype. The cool thing about parso is that it’s a round trip AST so it’s easy to perform refactorings or in this case preprocessing without affecting formatting or comments. / Anders _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/