MCPcopy Create free account
hub / github.com/EntilZha/PyFunctional / non_empty

Method non_empty

functional/pipeline.py:635–647  ·  view source on GitHub ↗

Returns True if the sequence does not have length zero. >>> seq([]).non_empty() False >>> seq([1]).non_empty() True :return: True if sequence length is not zero

(self)

Source from the content-addressed store, hash-verified

633 return self.size() == 0
634
635 def non_empty(self):
636 """
637 Returns True if the sequence does not have length zero.
638
639 >>> seq([]).non_empty()
640 False
641
642 >>> seq([1]).non_empty()
643 True
644
645 :return: True if sequence length is not zero
646 """
647 return self.size() != 0
648
649 def any(self):
650 """

Callers 1

test_non_emptyMethod · 0.80

Calls 1

sizeMethod · 0.95

Tested by 1

test_non_emptyMethod · 0.64