This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients pavel-lexyr, rhettinger
Date 2021-07-05.23:25:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625527559.06.0.526238682294.issue44571@roundup.psfhosted.org>
In-reply-to
Content
Thanks for the suggestion.  I agree that the loss of the non-matching element is an irritant.  The suggestion to return the first false element would solve that problem but is itself hard to work with.  The result would be difficult to reason about because all the elements are except one are true, the last is false, and you can't know that you have gotten a false element until one more call to next() to determine that no more elements are forthcoming.

Also, I'm reluctant to create any variants for takewhile() or dropwhile().  Those have been the least successful itertools.  If I had it to do over again, they would not have been included.  For the most part, generator based solutions are superior in terms of readability, flexibility, and performance.
History
Date User Action Args
2021-07-05 23:25:59rhettingersetrecipients: + rhettinger, pavel-lexyr
2021-07-05 23:25:59rhettingersetmessageid: <1625527559.06.0.526238682294.issue44571@roundup.psfhosted.org>
2021-07-05 23:25:59rhettingerlinkissue44571 messages
2021-07-05 23:25:58rhettingercreate