summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2012-12-06 18:11:11 -0800
committerINADA Naoki <songofacandy@gmail.com>2012-12-06 18:11:11 -0800
commit4d844df492c84c5ddd9f725e493900ce6f4eecc5 (patch)
tree99fc7d50f05a29945ee12771bde46b53b00be480
parent15f309c0b197abe86e94fb3840ff8979b35c7e0c (diff)
parent56ef0d07debe19af355f284d54ee5f1dcf542592 (diff)
downloadmsgpack-python-4d844df492c84c5ddd9f725e493900ce6f4eecc5.tar.gz
Merge pull request #36 from jnothman/patch-3
Warn about StopIteration in README
-rw-r--r--README.rst3
1 files changed, 3 insertions, 0 deletions
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: