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

Terry Reedy tjreedy at udel.edu
Thu Feb 12 23:12:04 CET 2015


On 2/11/2015 10:40 PM, Ben Finney wrote:
> Terry Reedy <tjreedy at udel.edu> writes:

Nick Coughlin wrote a comment 'pointing his finger' at people who use 
'_' to mean something other than the gettext convert function.  I 
replied ...

>> People are just copying python itself, which defines _ as a throwaway
>> name. I suspect it did so before gettext.
>>
>> By reusing _, gettext made interactive experimentation tricky.

> Gettext has been using the name ‘_’ since 1995, which was in Python's
> infancy. The name ‘_’ is pretty obvious, I'm sure it was in use before
> Python came along.

I believe Python 1.0 was released in Feb 1992.  I strongly suspect that 
'_' was bound to expression in the interactive interpreter before the 
gettext module was added.

> So, rather than the point-the-finger phrasing you give above,

By snipping Nick's point-the-finger phrasing, you are being a little 
unfair to me.

> I'd say instead:
>
> By choosing the name ‘_’, both Gettext and Python (and any of numerous
> other systems which chose that name) made a name collision likely.

And so I suggested a possible solution.

-- 
Terry Jan Reedy




More information about the Python-ideas mailing list