[Python-ideas] Gettext syntax (was Re: Allow "assigning" to ...)

Terry Reedy tjreedy at udel.edu
Fri Feb 13 04:05:04 CET 2015


On 2/12/2015 5:41 PM, Terry Reedy wrote:

> Of course, one can learn to forgo the '_' convenience and test or
> experiment with explicit assignments.
>
>  >>> s = _('cat')
>  >>> s
> 'gato'  # for instance

As pointed out to me privately, this rebinds _ to the value of s.
So instead

 >>> print(s)
gato

-- 
Terry Jan Reedy



More information about the Python-ideas mailing list