

def remove(self, triple, context=None):
    (subject, predicate, object_) = triple
    if (isinstance(subject, REGEXTerm) or isinstance(predicate, REGEXTerm) or isinstance(object_, REGEXTerm) or ((context is not None) and isinstance(context.identifier, REGEXTerm))):
        s = (((not isinstance(subject, REGEXTerm)) and subject) or None)
        p = (((not isinstance(predicate, REGEXTerm)) and predicate) or None)
        o = (((not isinstance(object_, REGEXTerm)) and object_) or None)
        c = ((((context is not None) and (not isinstance(context.identifier, REGEXTerm))) and context) or None)
        removeQuadList = []
        for ((s1, p1, o1), cg) in self.storage.triples((s, p, o), c):
            for ctx in cg:
                ctx = ctx.identifier
                if regexCompareQuad((s1, p1, o1, ctx), (subject, predicate, object_, (((context is not None) and context.identifier) or context))):
                    removeQuadList.append((s1, p1, o1, ctx))
        for (s, p, o, c) in p1:
            self.storage.remove((s, p, o), ((c and Graph(self, c)) or c))
    else:
        self.storage.remove((subject, predicate, object_), context)

dataset/ETHPy150Open RDFLib/rdflib/rdflib/plugins/stores/regexmatching.py REGEXMatching.remove/VarMisuse@281/316 `removeQuadList`->`p1`