MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / isempty

Method isempty

suds/sax/element.py:678–693  ·  view source on GitHub ↗

Get whether the element has no children. @param content: Test content (children & text) only. @type content: boolean @return: True when element has not children. @rtype: boolean

(self, content=True)

Source from the content-addressed store, hash-verified

676 return self
677
678 def isempty(self, content=True):
679 """
680 Get whether the element has no children.
681 @param content: Test content (children & text) only.
682 @type content: boolean
683 @return: True when element has not children.
684 @rtype: boolean
685 """
686 noattrs = not len(self.attributes)
687 nochildren = not len(self.children)
688 notext = self.text is None
689 nocontent = nochildren and notext
690 if content:
691 return nocontent
692 else:
693 return nocontent and noattrs
694
695 def isnil(self):
696 """

Callers 4

strMethod · 0.95
plainMethod · 0.95
pruneMethod · 0.80
implanyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected