where is str.itersplit() ?

  • Thread starter Konstantin Veretennicov
  • Start date
K

Konstantin Veretennicov

Don't you think an iterator version of str.split() could be handy
in some cases?
You may have to split() quite a long string, but really need only
one chunk at a time, not entire list at once (looks like a typical
use case for iterator/generator).

I am well aware of re.finditer(), but that means pulling out regex
bigguns, which may be undesirable.

Has there been any discussion of this topic that i missed?
Do you think introduction of string methods isplit()
and isplitlines() would be worth it? With v2.3 itertools and
v2.4 generator expressions the "lazy" trend is obvious.

- kv
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,040
Members
47,634
Latest member
RonnyBoelk

Latest Threads

Top