Commit 60c7ca2f authored by Antoine Millet's avatar Antoine Millet
Browse files

Added __sub__ method on TqlResponse objects

parent 904fe092
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -137,6 +137,15 @@ class TqlResponse(object):
                response.add(obj)
        return response

    def __sub__(self, other):
        response = self.copy()
        for obj in other:
            try:
                response.remove(obj)
            except KeyError:
                pass
        return response

    def __getitem__(self, name):
        obj = self.get(name)
        if obj is None: