diff --git a/IPython/core/macro.py b/IPython/core/macro.py index f017f09..ed6c11f 100644 --- a/IPython/core/macro.py +++ b/IPython/core/macro.py @@ -51,3 +51,10 @@ class Macro(object): def __getstate__(self): """ needed for safe pickling via %store """ return {'value': self.value} + + def __add__(self, other): + if isinstance(other, Macro): + return Macro(self.value + other.value) + elif isinstance(other, basestring): + return Macro(self.value + other) + raise TypeError