New submission from Martin Winks <[email protected]>:
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 better solution without allocating new list.
----------
components: Unicode
messages: 384270
nosy: ezio.melotti, uwinx, vstinner
priority: normal
severity: normal
status: open
title: Add str.split_iter function
type: enhancement
versions: Python 3.10
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42816>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com