Description
Steps to reproduce
- Run the following in a fresh IPython session:
In [1]: 'test'
Out[1]: 'test'
In [2]: _ = 42
In [3]: _
Out[3]: 42
In [4]: del _
In [5]: 6+6
Out[5]: 12
In [6]: _
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[6], line 1
----> 1 _
NameError: name '_' is not defined
Expected behavior
IPython should display _ as the special variable containing the last result (here, 12), consistent with CPython REPL.
Environment
- IPython version: 9.5.0
- Python version: 3.13.5
- OS: Linux Ubuntu
Description
Steps to reproduce
Expected behavior
IPython should display
_as the special variable containing the last result (here,12), consistent with CPython REPL.Environment