summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpiros Eliopoulos <seliopou@gmail.com>2012-11-01 11:28:11 -0400
committerSpiros Eliopoulos <seliopou@gmail.com>2012-11-01 11:29:33 -0400
commitd025d908821f60423fd4ad20f04500f3a289783a (patch)
tree7dd3c4108659a73d595016fbfe744ce767689b03
parent30233a5a995e23b72319598d11ebba084497a18b (diff)
downloadmsgpack-python-d025d908821f60423fd4ad20f04500f3a289783a.tar.gz
Put Unpacker read loop back into buffer read loop
So it works for streaming as intended.
-rw-r--r--README.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index c15d46b..dcd3eb1 100644
--- a/README.rst
+++ b/README.rst
@@ -52,15 +52,15 @@ stream.
buf.seek(0)
- unpacker = msgpack.Unpacker()
- while True:
+ unpacker = msgpack.Unpacker()
+ while True:
data = buf.read(16)
if not data:
break
unpacker.feed(data)
- for unpacked in unpacker:
- print unpacked
+ for unpacked in unpacker:
+ print unpacked
packing/unpacking of custom data type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^