Re: Translatable Strings

Luke Davis

On Sun, 3 Nov 2019, Julien Cochuyt wrote:

On the other hand, the u prefix in u"text" denotes a Unicode string.
It must be used in Python 2 as soon as your string literal contains non ANSI characters.
Unless you:

from __future__ import unicode_literals

In Python 2 code. Then the u"" is not required in either version of Python.

Personally I prefer this method for compatibility with both, and cleaner code.


Join to automatically receive all group messages.