[Python-ideas] Allow "assigning" to Ellipse to discard values.

Nikolaus Rath Nikolaus at rath.org
Thu Feb 12 06:10:19 CET 2015


On Feb 11 2015, Ethan Furman <ethan-gcWI5d7PMXnvaiG9KC9N7Q at public.gmane.org> wrote:
> On 02/11/2015 03:15 PM, Eric V. Smith wrote:
>
>> Thanks, Thunderbird, for mangling that for me. Hopefully this works better:
>> 
>>--> import gettext
>>--> gettext.install('foo')
>>--> _
>> <bound method NullTranslations.gettext of gettext.NullTranslations
>> instance at 0xffeb65cc>>
>
> Oh, cool.  It is somewhat amusing to see the stdlib doing something we
> are usually strongly advised against -- adding things to __bulitins__
> ;) . (Yes, I agree it is a good case... still amusing.)

Why is that a good case? What's wrong with e.g.
 _ = gettext.install('foo')
or
 from gettext import _
?

Thanks,
Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 997 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150211/2411f919/attachment.sig>


More information about the Python-ideas mailing list