[Python-ideas] Allow "assigning" to Ellipse to discard values.
Eric V. Smith
eric at trueblade.com
Thu Feb 12 00:13:15 CET 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2/11/2015 6:06 PM, Ethan Furman wrote:
> On 02/11/2015 03:01 PM, Nick Coghlan wrote:
>> On 12 February 2015 at 01:46, Antoine Pitrou wrote:
>>>
>>> The actual deal with that is when you are using gettext or a
>>> similar I18N framework :-)
>>
>> I switched my own dummy variable recommendation to a
>> double-underscore years ago for exactly that reason. It (very)
>> mildly irritates me that so many sources still recommend the
>> single-underscore that clobbers the conventional name for the
>> gettext translation builtin :)
>
> Python 3.4.3rc1+ (3.4:645f3d750be1, Feb 10 2015, 13:25:59) [GCC
> 4.7.3] on linux Type "help", "copyright", "credits" or "license"
> for more information. --> _ Traceback (most recent call last): File
> "<stdin>", line 1, in <module> NameError: name '_' is not defined
> --> import gettext --> gettext._ Traceback (most recent call
> last): File "<stdin>", line 1, in <module> AttributeError: 'module'
> object has no attribute '_'
>
> What globalness are you talking about?
https://docs.python.org/2/library/gettext.html#gettext.install
>>> import gettext gettext.install('foo') _
<bound method NullTranslations.gettext of <gettext.NullTranslations
instance at 0xffeb65cc>>
>>>
- --
Eric.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJU2+ILAAoJENxauZFcKtNxmPgIAJbnDJoxNk00zAU27Wmdod9V
RucboE4CyuIPD6VA0x7f0Tk7l93gBaOe74ccUmaW4smpH/u/CDv5CbXWxBX748n8
88piSbCIlUQBgKVIbITgtjCOcFm96xJmDyJjApRcxwkB+QU289d/00Ef5kJ5ifLH
rM17e0OqZXdeBO+4AN0BIErftBhoA+vTsq476ubrWAIQA2+qLSNalUDhkiUpHJNn
tMkznWdEaquD4Ah1ScseActdCXyUkPDqhIzYQh05IKCfR1yahIL13RtsSyWMxBo2
ocZr+vrfQZGXzkyCHOAb2lAmxRcTaNyWzwbZZHocQKhMeZUMs5xBKNhXUeHmehM=
=cNcU
-----END PGP SIGNATURE-----
More information about the Python-ideas
mailing list