MCPcopy Index your code
hub / github.com/RustPython/RustPython / feed

Method feed

Lib/xml/sax/expatreader.py:200–215  ·  view source on GitHub ↗
(self, data, isFinal=False)

Source from the content-addressed store, hash-verified

198 # IncrementalParser methods
199
200 def feed(self, data, isFinal=False):
201 if not self._parsing:
202 self.reset()
203 self._parsing = True
204 self._cont_handler.startDocument()
205
206 try:
207 # The isFinal parameter is internal to the expat reader.
208 # If it is set to true, expat will check validity of the entire
209 # document. When feeding chunks, they are not normally final -
210 # except when invoked from close.
211 self._parser.Parse(data, isFinal)
212 except expat.error as e:
213 exc = SAXParseException(expat.ErrorString(e.code), e, self)
214 # FIXME: when to invoke error()?
215 self._err_handler.fatalError(exc)
216
217 def flush(self):
218 if self._parser is None:

Callers 1

closeMethod · 0.95

Calls 4

resetMethod · 0.95
SAXParseExceptionClass · 0.85
startDocumentMethod · 0.45
fatalErrorMethod · 0.45

Tested by

no test coverage detected