wikitextparser/_wikitext.py
def _subspans(self, _type: str) -> Generator[int, None, None]:
        """Yield all the sub-span indices excluding self._span."""
        ss, se = self._span
        spans = self._type_to_spans[_type]
        # Do not yield self._span by bisecting for s < ss.
        # The second bisect is an optimization and should be on [se + 1],
        # but empty spans are not desired thus [se] is used.
        b = bisect(spans, [ss])
        for span in spans[b:bisect(spans, [se], b)]:
            if span[1] <= se:
                yield span
def _subspans(self, _type: str) -> Generator[int, None, None]:
        ss, se = self._span
        spans = self._type_to_spans[_type]
        # Do not yield self._span by bisecting for s < ss.
        # The second bisect is an optimization and should be on [se + 1],
        # but empty spans are not desired thus [se] is used.
        b = bisect(spans, [ss])
        for span in spans[b:bisect(spans, [se], b)]:
            if span[1] <= se:
                yield span
def _subspans ( self , _type : str ) -> Generator [ int , None , None ] : ss , se = self . _span spans = self . _type_to_spans [ _type ] # Do not yield self._span by bisecting for s < ss. # The second bisect is an optimization and should be on [se + 1], # but empty spans are not desired thus [se] is used. b = bisect ( spans , [ ss ] ) for span in spans [ b : bisect ( spans , [ se ] , b ) ] : if span [ 1 ] <= se : yield span
Yield all the sub-span indices excluding self._span.
Yield all the sub - span indices excluding self . _span .