(self, begin, all=False)
yield word in the document until line ends
yield word in the document until line ends
yield word in the document until line ends
def split_word(self, begin, all=False):
        """yield word in the document until line ends"""

        for m in self.RE_SPLITWORD.finditer(self.document, pos=begin):
            # split unmatched characters by character category.
            f, t = m.span()
            if f != begin:
                yield from self._split_chars(begin, f)
            begin = t

            yield (f, t, m.group(), m.lastgroup)

            # finish if we reach '\n'
            if not all and m.lastgroup == '_LF':
                return

        yield from self._split_chars(begin, self.document.endpos())
def split_word ( self , begin , all = False ) : for m in self . RE_SPLITWORD . finditer ( self . document , pos = begin ) : # split unmatched characters by character category. f , t = m . span ( ) if f != begin : yield from self . _split_chars ( begin , f ) begin = t yield ( f , t , m . group ( ) , m . lastgroup ) # finish if we reach '\n' if not all and m . lastgroup == '_LF' : return yield from self . _split_chars ( begin , self . document . endpos ( ) )