MCPcopy Index your code
hub / github.com/csev/py4e / clear

Method clear

code3/bs4/element.py:919–931  ·  view source on GitHub ↗

Extract all children. If decompose is True, decompose instead.

(self, decompose=False)

Source from the content-addressed store, hash-verified

917 i = next
918
919 def clear(self, decompose=False):
920 """
921 Extract all children. If decompose is True, decompose instead.
922 """
923 if decompose:
924 for element in self.contents[:]:
925 if isinstance(element, Tag):
926 element.decompose()
927 else:
928 element.extract()
929 else:
930 for element in self.contents[:]:
931 element.extract()
932
933 def index(self, element):
934 """

Callers 9

stringMethod · 0.95
matchBracketsFunction · 0.45
codemirror.jsFile · 0.45
markTextFunction · 0.45
codemirror.jsFile · 0.45
markTextFunction · 0.45
SharedTextMarkerFunction · 0.45
decomposeMethod · 0.45
test_clearMethod · 0.45

Calls 2

decomposeMethod · 0.45
extractMethod · 0.45

Tested by 1

test_clearMethod · 0.36