diff --git a/gte/rpnlib.py b/gte/rpnlib.py index 9c1c27f..a9fd0d3 100644 --- a/gte/rpnlib.py +++ b/gte/rpnlib.py @@ -60,6 +60,9 @@ class RpnExpr(list): raise TypeError('RpnSymbol expected but got %s' % type(val)) super().__setitem(idx, val) + def __str__(self): + return ' '.join([str(sym) for sym in self]) + @classmethod def random(cls, sz): return cls([RpnSymbol.random() for _ in range(sz)])