Fate of itertools.dropwhile() and itertools.takewhile()

Michele Simionato michele.simionato at gmail.com
Sun Dec 30 00:17:01 EST 2007


On Dec 30, 12:10 am, Raymond Hettinger <pyt... at rcn.com> wrote:
> I'm considering deprecating these two functions and would like some
> feedback from the community or from people who have a background in
> functional programming.


I am with Steven D'Aprano when he says that takewhile and dropwhile
are clear enough. On the other hand, in my code
base I have exactly zero occurrences of takewhile and
dropwhile, even if I tend to use the itertools quite
often. That should be telling. If my situations is
common, that means that takewhile and dropwhile are
useless in practice and should be deprecated.
But I will wait for other respondents. It may just be
that I never needed them. I presume you did scans of
large code bases and you did not find occurrences of
takewhile and dropwhile, right?


  Michele Simionato



More information about the Python-list mailing list