From 1ab415d9aae0b3b7724e57fdf6dad6db52b0c7b3 2024-03-30 17:16:43 From: Michael Bianco Date: 2024-03-30 17:16:43 Subject: [PATCH] add __repr__ to MagicsDisplay --- diff --git a/IPython/core/magics/basic.py b/IPython/core/magics/basic.py index 3ac4049..89ec4fc 100644 --- a/IPython/core/magics/basic.py +++ b/IPython/core/magics/basic.py @@ -40,6 +40,9 @@ class MagicsDisplay(object): def _repr_pretty_(self, p, cycle): p.text(self._lsmagic()) + def __repr__(self): + return self.__str__() + def __str__(self): return self._lsmagic()