code-ify stopIteration in the docs
(cherry picked from commit 86e6dd58c2817b40a1249e452cc915f3375e79a5)