MCPcopy Create free account
hub / github.com/numpy/numpy / consume_until

Method consume_until

numpy/core/_internal.py:632–642  ·  view source on GitHub ↗
(self, c)

Source from the content-addressed store, hash-verified

630 return False
631
632 def consume_until(self, c):
633 if callable(c):
634 i = 0
635 while i < len(self.s) and not c(self.s[i]):
636 i = i + 1
637 return self.advance(i)
638 else:
639 i = self.s.index(c)
640 res = self.advance(i)
641 self.advance(len(c))
642 return res
643
644 @property
645 def next(self):

Callers 1

__dtype_from_pep3118Function · 0.80

Calls 2

advanceMethod · 0.95
indexMethod · 0.45

Tested by

no test coverage detected