Message397025
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. |
|
Date |
User |
Action |
Args |
2021-07-05 22:33:28 | pavel-lexyr | set | recipients:
+ pavel-lexyr, rhettinger |
2021-07-05 22:33:28 | pavel-lexyr | set | messageid: <1625524408.64.0.445781965255.issue44571@roundup.psfhosted.org> |
2021-07-05 22:33:28 | pavel-lexyr | link | issue44571 messages |
2021-07-05 22:33:28 | pavel-lexyr | create | |
|