aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/core/displayhook.py
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2023-09-30 10:27:28 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2023-09-30 10:47:10 +0300
commit5a6373c9d09bbfb7094f9992a4531477bb97829e (patch)
treeebea8fd55fee858876743312cdf789a1f01487b5 /contrib/python/ipython/py3/IPython/core/displayhook.py
parent15f3c7493474de25a6b23296878bb8f49470d2e6 (diff)
downloadydb-5a6373c9d09bbfb7094f9992a4531477bb97829e.tar.gz
Update contrib/python/ipython/py3 to 8.15.0
Diffstat (limited to 'contrib/python/ipython/py3/IPython/core/displayhook.py')
-rw-r--r--contrib/python/ipython/py3/IPython/core/displayhook.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/python/ipython/py3/IPython/core/displayhook.py b/contrib/python/ipython/py3/IPython/core/displayhook.py
index aba4f904d8..b411f11613 100644
--- a/contrib/python/ipython/py3/IPython/core/displayhook.py
+++ b/contrib/python/ipython/py3/IPython/core/displayhook.py
@@ -297,8 +297,13 @@ class DisplayHook(Configurable):
for n in range(1,self.prompt_count + 1):
key = '_'+repr(n)
try:
+ del self.shell.user_ns_hidden[key]
+ except KeyError:
+ pass
+ try:
del self.shell.user_ns[key]
- except: pass
+ except KeyError:
+ pass
# In some embedded circumstances, the user_ns doesn't have the
# '_oh' key set up.
oh = self.shell.user_ns.get('_oh', None)