Message320354
The purpose would be two-fold:
1. The presence of the `check_signals()` wrapper provides a way to more explicitly document that the other itertools iterators *don't* implicitly check for signals, so if you want to combine them with consumers that also don't check for signals, then you're going to need to wrap the iterator.
2. As a helper for integration code that's dealing with consumers that don't check for signals, but want to make those loops interruptible. Doing that in Python (as in my example) is inefficient, since you end up running Python bytecode on every iteration, and also don't have as much control over exactly when the signals get checked.
Given a solution to issue 33939, I'd drop the priority on this issue to low, but I don't think it would make it redundant. |
|
Date |
User |
Action |
Args |
2018-06-24 05:39:24 | ncoghlan | set | recipients:
+ ncoghlan, tim.peters, rhettinger, serhiy.storchaka, koos.zevenhoven |
2018-06-24 05:39:24 | ncoghlan | set | messageid: <1529818764.69.0.56676864532.issue31815@psf.upfronthosting.co.za> |
2018-06-24 05:39:24 | ncoghlan | link | issue31815 messages |
2018-06-24 05:39:24 | ncoghlan | create | |
|