MCPcopy Index your code
hub / github.com/webpy/webpy / __nonzero__

Method __nonzero__

web/utils.py:710–721  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

708 raise IndexError(str(i))
709
710 def __nonzero__(self):
711 if hasattr(self, "__len__"):
712 return self.__len__() != 0
713 elif hasattr(self, "_head"):
714 return True
715 else:
716 try:
717 self._head = next(self.i)
718 except StopIteration:
719 return False
720 else:
721 return True
722
723 __bool__ = __nonzero__
724

Callers

nothing calls this directly

Calls 2

nextFunction · 0.85
__len__Method · 0.45

Tested by

no test coverage detected