summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2020-02-06 20:29:33 +0900
committerInada Naoki <songofacandy@gmail.com>2020-02-06 20:29:33 +0900
commit24950990f4ebeffbf98acd188b171cc60a27095e (patch)
tree2980ad9459d0dfc0cba8c922809be9792b7108af
parent1bd6fc36d09cea273a5b47d4f54ed5e3b718582c (diff)
downloadmsgpack-python-24950990f4ebeffbf98acd188b171cc60a27095e.tar.gz
Remove broken example
-rw-r--r--README.md18
1 files changed, 0 insertions, 18 deletions
diff --git a/README.md b/README.md
index 48401be..a4d69c1 100644
--- a/README.md
+++ b/README.md
@@ -214,24 +214,6 @@ 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.
-Each of these methods may optionally write the packed data it reads to a
-callback function:
-
-```py
- from io import BytesIO
-
- def distribute(unpacker, get_worker):
- nelems = unpacker.read_map_header()
- for i in range(nelems):
- # Select a worker for the given key
- key = unpacker.unpack()
- worker = get_worker(key)
-
- # Send the value as a packed message to worker
- bytestream = BytesIO()
- unpacker.skip(bytestream.write)
- worker.send(bytestream.getvalue())
-```
## Notes