diff --git a/src/arithmetic_container.py b/src/arithmetic_container.py index 19b08723dfdd208b7c6244de359834652dca36d7..23845cad83bd64445ae8da4262b61cbdc230c9d6 100644 --- a/src/arithmetic_container.py +++ b/src/arithmetic_container.py @@ -131,6 +131,16 @@ class ArithmeticList(list): def __repr__(self): return "ArithmeticList(%s)" % list.__repr__(self) + def plus(self, other): + """Return a copy of self extended by the entries from the iterable + C{other}. + + Makes up for the loss of the C{+} operator (which is now arithmetic). + """ + result = ArithmeticList(self) + result.extend(other) + return result +