Wishlist item: itertools.flatten

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Fri Mar 11 23:55:38 CET 2005


On 12 Mar 2005 00:44:39 +0200, rumours say that Ville Vainio
<ville at spammers.com> might have written:

>    Christos> This is just a personal opinion, but I detest restraints
>    Christos> on library (itertools module in this case) expansion
>    Christos> when talking about such useful *building blocks*.
>
>Yeah - esp. in the case of flattening. If it was deemed useful enough
>to be the default behavior in perl (which is admittedly braindamaged),
>it should surely warrant being included as a single function in the
>stdlib.

Or a window function, which I have needed enough times in *separate* occasions
to add it in one of my personal "stdlib" modules (hinting it could be part of
itertools):

window('hello', 2) => 'he', 'el', 'll', 'lo'
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...



More information about the Python-list mailing list