From 56ef0d07debe19af355f284d54ee5f1dcf542592 Mon Sep 17 00:00:00 2001 From: jnothman Date: Fri, 7 Dec 2012 11:12:19 +1100 Subject: Warn about StopIteration in README --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 30a264d..61cc56c 100644 --- a/README.rst +++ b/README.rst @@ -116,6 +116,9 @@ the result, or ignoring it. The latter two methods return the number of elements in the upcoming container, so that each element in an array, or key-value pair in a map, can be unpacked or skipped individually. +Warning: these methods raise ``StopIteration`` when called at the end of the +stream. Unless caught, this may silently break an iteration. + Each of these methods may optionally write the packed data it reads to a callback function: -- cgit v1.2.1