MCPcopy Index your code
hub / github.com/python/cpython / getEvent

Method getEvent

Lib/xml/dom/pulldom.py:243–256  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

241 event = self.getEvent()
242
243 def getEvent(self):
244 # use IncrementalParser interface, so we get the desired
245 # pull effect
246 if not self.pulldom.firstEvent[1]:
247 self.pulldom.lastEvent = self.pulldom.firstEvent
248 while not self.pulldom.firstEvent[1]:
249 buf = self.stream.read(self.bufsize)
250 if not buf:
251 self.parser.close()
252 return None
253 self.parser.feed(buf)
254 rc = self.pulldom.firstEvent[1][0]
255 self.pulldom.firstEvent[1] = self.pulldom.firstEvent[1][1]
256 return rc
257
258 def _slurp(self):
259 """ Fallback replacement for getEvent() using the

Callers 3

__next__Method · 0.95
expandNodeMethod · 0.95
_do_pulldom_parseFunction · 0.80

Calls 3

readMethod · 0.45
closeMethod · 0.45
feedMethod · 0.45

Tested by

no test coverage detected