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

Method empty

functional/pipeline.py:621–633  ·  view source on GitHub ↗

Returns True if the sequence has length zero. >>> seq([]).empty() True >>> seq([1]).empty() False :return: True if sequence length is zero

(self)

Source from the content-addressed store, hash-verified

619 return self.len()
620
621 def empty(self):
622 """
623 Returns True if the sequence has length zero.
624
625 >>> seq([]).empty()
626 True
627
628 >>> seq([1]).empty()
629 False
630
631 :return: True if sequence length is zero
632 """
633 return self.size() == 0
634
635 def non_empty(self):
636 """

Callers 2

productMethod · 0.95
test_emptyMethod · 0.80

Calls 1

sizeMethod · 0.95

Tested by 1

test_emptyMethod · 0.64