Martin Winks <c...@snejugal.ru> 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 objects. writing regular expressions for different separators/data would be a quite overheadish, so the idea of one-case solution doesn't seem to go very far and requires a bigger change in code for different separators. let's try to revive this one :) ---------- nosy: +uwinx _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue17343> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com