MCPcopy Create free account
hub / github.com/clips/pattern / setup

Method setup

pattern/web/soup/BeautifulSoup.py:132–142  ·  view source on GitHub ↗

Sets up the initial relations between this element and other elements.

(self, parent=None, previous=None)

Source from the content-addressed store, hash-verified

130 XML_SPECIAL_CHARS_TO_ENTITIES = _invert(XML_ENTITIES_TO_SPECIAL_CHARS)
131
132 def setup(self, parent=None, previous=None):
133 """Sets up the initial relations between this element and
134 other elements."""
135 self.parent = parent
136 self.previous = previous
137 self.next = None
138 self.previousSibling = None
139 self.nextSibling = None
140 if self.parent and self.parent.contents:
141 self.previousSibling = self.parent.contents[-1]
142 self.previousSibling.nextSibling = self
143
144 def replaceWith(self, replaceWith):
145 oldParent = self.parent

Callers 2

__init__Method · 0.45
endDataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected