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

Method popTag

pattern/web/soup/BeautifulSoup.py:1695–1704  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1693 know if you do. Mainly I like the name."""
1694
1695 def popTag(self):
1696 if len(self.tagStack) > 1:
1697 tag = self.tagStack[-1]
1698 parent = self.tagStack[-2]
1699 parent._getAttrMap()
1700 if (isinstance(tag, Tag) and len(tag.contents) == 1 and
1701 isinstance(tag.contents[0], NavigableString) and
1702 not parent.attrMap.has_key(tag.name)):
1703 parent[tag.name] = tag.contents[0]
1704 BeautifulStoneSoup.popTag(self)
1705
1706#Enterprise class names! It has come to our attention that some people
1707#think the names of the Beautiful Soup parser classes are too silly

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
_getAttrMapMethod · 0.80
has_keyMethod · 0.45

Tested by

no test coverage detected