Duncan Booth <duncan.booth at invalid.invalid> writes: > I wouldn't agree that there is no way reasonable way to get the terminating > value with takewhile, you just need another generator or two: Hmm, I hadn't thought about iterator.send. I'll have to look at that more carefully and re-read the PEP.