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 pavel-lexyr
Recipients pavel-lexyr, rhettinger
Date 2021-07-05.22:33:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625524408.64.0.445781965255.issue44571@roundup.psfhosted.org>
In-reply-to
Content
As described in the documentation, itertools.takewhile() returns all the elements until the first one that does not match the provided criterion. In case of a destructive iterator, or one with side effects, not yielding an element downstream may render takewhile() unsuitable for use.

Proposed is itertools.takedowhile() - an alternate function that yields the first false element as well, and returns after. The behaviour is identical otherwise.
History
Date User Action Args
2021-07-05 22:33:28pavel-lexyrsetrecipients: + pavel-lexyr, rhettinger
2021-07-05 22:33:28pavel-lexyrsetmessageid: <1625524408.64.0.445781965255.issue44571@roundup.psfhosted.org>
2021-07-05 22:33:28pavel-lexyrlinkissue44571 messages
2021-07-05 22:33:28pavel-lexyrcreate