Oscar Benjamin added the comment:

Thank you Claudiu very much for writing a patch; I was expecting to
have to do that myself!

Serhiy, you're right groupby is a better fit for this. It does mean a
bit of reworking for the (more complicated) sum function I'm working
on but I've just checked with timeit and it performs very well using
the type function as a predicate. I think it might make the function a
few times faster than takewhile in my common cases for reasons that
are particular to this problem.

Raymond, thanks for taking the time to consider this. I agree that it
should now be closed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18821>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to