underscore broken in 5.1.0 #10095

talkaminker opened this Issue Dec 18, 2016 · 3 comments


None yet

3 participants

talkaminker commented Dec 18, 2016 edited

instead of having the last computation it holds:
<bound method NullTranslations.gettext of <gettext.NullTranslations instance at 0x7f52f40945f0>>
how to reproduce (at least on ubuntu 64-bit installed from conda)

>>> 1
>>> _
<bound method NullTranslations.gettext of <gettext.NullTranslations instance at 0x7f52f40945f0>>

downgrading to ipython 4.2 fixes the problem

@talkaminker talkaminker changed the title from underscore to underscore broken in 5.1.0 Dec 18, 2016

It's common for code that needs strings translated to bind _ to the translation machinery globally for easy access. IPython does not do this, but I guess that something else in your system is getting called and does it.

Places to look: the $PYTHONSTARTUP environment variable, IPython startup files, and .pth files (which can run code when Python launches).


(For the record, I can't reproduce this problem on master)

@Carreau Carreau added this to the no action milestone Dec 25, 2016
Carreau commented Dec 25, 2016

Actually we even have recent code that pay attention as whether _ in the builtins not to shadow it.

The lines you are likely looking for are something that does:

import gettext
gettext.install('<a string>')

This is waht replace underscore.

@takluyver takluyver closed this Jan 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment