def next(self):
        while 1:
            try:
                item = self._events[self._index]
            except __HOLE__:
                if self._parser is None:
                    self.root = self._root
                    try:
                        raise StopIteration
                    except NameError:
                        raise IndexError
                # load event buffer
                del self._events[:]
                self._index = 0
                data = self._file.read(16384)
                if data:
                    self._parser.feed(data)
                else:
                    self._root = self._parser.close()
                    self._parser = None
            else:
                self._index = self._index + 1
                return item
dataset/ETHPy150Open babble/babble/include/jython/Lib/xml/etree/ElementTree.py/iterparse.next