Martin Winks added the comment:
> Perhaps the use case is already served by re.finditer()
def split_whitespace_ascii(s: str):
return (pt.group(0) for pt in re.finditer(r"[A-Za-z']+", s))
solution above does not cover all possible data and is incorrect for bytes-like
obje
New submission from Martin Winks :
Split string by given separator and return iterator as a result.
The naive and not very efficient solution would be using current str.split:
def split_iter(self: str, sep: str) -> 'Iterator[str]':
return iter(self.split(sep))
Probably, need we'll s