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

Method get_events

Lib/test/test_htmlparser.py:33–46  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 self._set_support_cdata(False)
32
33 def get_events(self):
34 # Normalize the list of events so that buffer artefacts don't
35 # separate runs of contiguous characters.
36 L = []
37 prevtype = None
38 for event in self.events:
39 type = event[0]
40 if type == prevtype == "data":
41 L[-1] = ("data", L[-1][1] + event[1])
42 else:
43 L.append(event)
44 prevtype = type
45 self.events = L
46 return L
47
48 # structure markup
49

Callers 2

_run_checkMethod · 0.45

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected