A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-June/054465.html below:

[Python-Dev] Some RFE for review

[Python-Dev] Some RFE for review [Python-Dev] Some RFE for reviewPaul Moore p.f.moore at gmail.com
Mon Jun 27 14:22:26 CEST 2005
On 6/27/05, Nick Coghlan <ncoghlan at gmail.com> wrote:
> As Douglas Alan's sample implementation (and his second attempt [1])
> show, getting this right (and reasonably efficient) is actually a
> non-trivial exercise. Leveraging the existing xreadlines
> infrastructure is an idea worth considering.
> 
> I think it's worth leaving this one open, and see if someone comes up
> with a patch (obviously, this was my opinion from the start, or I
> wouldn't have raised the RFE in response to Douglas's query!)

As a more general approach, would it be worth considering an addition
to itertools which took an iterator which generated "blocks" of items,
and split them on a subsequence? It's a generalisation of the basic
pattern here, and would be able to encapsulate the fiddly "what if a
separator overlaps a block split" logic without locking it down to
string manipulation...

Or does that count as overgeneralisation?

Paul.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4