def getChildIter(element, index):
    class ChildIter:
        def __init__(self, element, index):
            self.element = element
            self.index = index

        def next(self):
            if self.index < len(self.element.childNodes):
                retVal = self.element.childNodes.item(self.index)
                self.index += 1
            else:
                retVal = None
            return retVal

        def checkEnd(self):
            if self.index != len(self.element.childNodes):
                raise SyntaxError(self.element.tagName % "Too many elements under: '%s'")
    return ChildIter(element, index)
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/tlslite/utils/xmltools.py/getChildIter/swapped operands of `%`