Restore progressbar iterator interface; add test
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- add a test for iterating on a progressbar with next() - implement `next()` in terms of `iter(ProgressBar)`, which is already well-defined - add a note about slow operations with progressbar to narrative docs One of the keys to this working is that `ProgressBar.generator` is consuming an iterable and doesn't store any important state in local variables, making it re-entry safe. I wasn't sure how we can best hint in the public docs that simply walking the bar and stopping one step short of finishing will result in the progress bar "hanging" unfinished. Noting that we work well with things like `time.sleep()` seems like a decent way of advertising positively something which we support *and* guiding anyone going off-book into proper usage. closes #1125
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+54 added−4 removed
- tests:+20 added−0 removed
- other:+34 added−4 removed