summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.rst12
1 files changed, 3 insertions, 9 deletions
diff --git a/README.rst b/README.rst
index 8cebc01..8154098 100644
--- a/README.rst
+++ b/README.rst
@@ -55,15 +55,9 @@ stream.
buf.seek(0)
- unpacker = msgpack.Unpacker()
- while True:
- data = buf.read(16)
- if not data:
- break
- unpacker.feed(data)
-
- for unpacked in unpacker:
- print unpacked
+ unpacker = msgpack.Unpacker(buf)
+ for unpacked in unpacker:
+ print unpacked
packing/unpacking of custom data type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^