def iterDescendantsWithName(dom, tagName, max_depth = 0):
    '''\
    Iterate over descendant elements whose name is contained in
    tagName (or is named tagName if tagName is a string).  Only
    consider nodes up to max_depth deep when max_depth is greater than
    zero.
    '''
    if isinstance(tagName, basestring):
        tagName = (tagName,)
    def match(d):
        return tagName in d.tagName
    return iterMatchingDescendants(dom, match, max_depth)
dataset/ETHPy150Open coreemu/core/daemon/core/misc/xmlutils.py/iterDescendantsWithName/swapped operands of `in`