not_

returns elements that are not in the given elements.

Arguments

Source


def not_(self, pynodelist):
    ret = pyNodeList()
    for node in self:
        dif = True
        for another in pynodelist:
            if node == another:
                dif = False
                break
        if dif:
            ret.append(node)
    if len(ret) == 1: return ret[0]
    else: return ret