##// END OF EJS Templates
Do not update the unders if they are user defined...
Do not update the unders if they are user defined Closes jupyter/notebook#1628 (once there are tests). Still shift the internal reference to self._,__,___ but do not assign it in user ns. I would expect this to be a change of behavior and have the (slight) side effect that if any of the _, __, or __ are defined, then none of these are updated. We could update the logic to do the right think on leapfrog _, __ or __ if user-set, but is it worth it. If _ is in builtins, then _ will not update the history and _ will be the builtins, unless user set it explicitly in which case it takes precedence. Summary if user have set _ _ == value set by the user elif _ in builtins: _ == value in builtins._ else: _ == previous result. Note that this logic may fall down if the use set _ to a specific value, and have this save value returned while _ is also in builtin: In [1]: import gettext ; gettext.install('foo') In [2]: _ = 'Example' In [3]: _ Out[3]: 'Example' In [4]: _ Out[4]: 'Example' In [5]: _ Out[5]: <bound method NullTranslations.gettext of <...>>

File last commit:

r20870:cbe6a036
r22838:138b3a4a
Show More
README_STARTUP
11 lines | 371 B | text/plain | TextLexer
This is the IPython startup directory
.py and .ipy files in this directory will be run *prior* to any code or files specified
via the exec_lines or exec_files configurables whenever you load this profile.
Files will be run in lexicographical order, so you can control the execution order of files
with a prefix, e.g.::
00-first.py
50-middle.py
99-last.ipy