MCPcopy Create free account
hub / github.com/ActiveState/code / close

Method close

recipes/Python/286269_HTML_Scraper/recipe-286269.py:45–54  ·  view source on GitHub ↗

Returns any unprocessed data (without processing it) and resets the parser. Should be used after all the data has been handled using feed and then collected with push. This returns any trailing data that can't be processed. If you are processing everything in one go you can

(self)

Source from the content-addressed store, hash-verified

43 return data
44
45 def close(self):
46 """Returns any unprocessed data (without processing it) and resets the parser.
47 Should be used after all the data has been handled using feed and then collected with push.
48 This returns any trailing data that can't be processed.
49
50 If you are processing everything in one go you can safely use this method to return everything.
51 """
52 data = self.push() + self.buffer
53 self.buffer = ''
54 return data
55
56 def feed(self, data):
57 """Pass more data into the parser.

Callers 15

recipe-228010.pyFile · 0.45
_VmBFunction · 0.45
watchFunction · 0.45
recipe-286216.pyFile · 0.45
recipe-286217.pyFile · 0.45
md5sumFunction · 0.45
dumpDataFunction · 0.45
file2matrixFunction · 0.45
compressFunction · 0.45
uncompressFunction · 0.45
save_uploaded_fileFunction · 0.45
dumpFunction · 0.45

Calls 1

pushMethod · 0.95

Tested by 1

test_compareFunction · 0.36