From d4a3fa61728cc4da33d3ef33b0bfa39e44764434 2023-04-25 13:47:56 From: Matthias Bussonnier Date: 2023-04-25 13:47:56 Subject: [PATCH] Backport PR #14014 on branch 8.12.x (Fix %page not working: OInfo not subscriptable error.) (#14035) Backport PR #14014: Fix %page not working: OInfo not subscriptable error. --- diff --git a/IPython/core/magics/basic.py b/IPython/core/magics/basic.py index 0699994..814dec7 100644 --- a/IPython/core/magics/basic.py +++ b/IPython/core/magics/basic.py @@ -296,11 +296,11 @@ Currently the magic system has the following functions:""", oname = args and args or '_' info = self.shell._ofind(oname) - if info['found']: + if info.found: if raw: - txt = str(info["obj"]) + txt = str(info.obj) else: - txt = pformat(info["obj"]) + txt = pformat(info.obj) page.page(txt) else: print('Object `%s` not found' % oname)