[issue42816] Add str.split_iter function

2021-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue17343 mentions also a separate method str.itersplit, so I close this issue as a duplicate. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add a version of str.split which returns

[issue42816] Add str.split_iter function

2021-01-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: See also discussion here: #17343 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue42816] Add str.split_iter function

2021-01-03 Thread Steven D'Aprano
Steven D'Aprano added the comment: I am pretty sure this has been discussed and rejected on the Python-Ideas mailing list before. If not rejected, the idea didn't go very far. You may wish to search the mailing list archives for previous discussions. Either way, I think this should be discu

[issue42816] Add str.split_iter function

2021-01-03 Thread Martin Winks
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 some be