On 2020-02-03 03:55, Soni L. wrote:
On 2020-02-02 11:29 p.m., Eric V. Smith wrote:
On 2/2/2020 8:28 PM, Soni L. wrote:
It'd be cool to attach metadata to string literals that doesn't end up in the resulting string object. This metadata could be used by all sorts of tools, everything from localization to refactoring.

You might want to look at PEP 501.

Eric

Oh. No, I want it to return plain strings.

How about using annotations?

    >>> LocalizedString = str  # etc

    >>> my_string: LocalizedString = "An important message."

Perhaps _ is a more expected name however.

-Mike
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/VKPDUHZ4F75A6XUXYP7B4KG5PR7XZGBN/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to