8000 Update README · Martiniele/msgpack-python@ab66c27 · GitHub
[go: up one dir, main page]

Skip to content

Commit ab66c27

Browse files
committed
Update README
1 parent e093435 commit ab66c27

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ It is also possible to pack/unpack custom data types. Here is an example for
148148
``object_pairs_hook`` callback may instead be used to receive a list of
149149
key-value pairs.
150150

151+
151152
Extended types
152153
^^^^^^^^^^^^^^
153154

@@ -170,7 +171,7 @@ It is also possible to pack/unpack custom data types using the **ext** type.
170171
... return ExtType(code, data)
171172
...
172173
>>> data = array.array('d', [1.2, 3.4])
173-
>>> packed = msgpack.packb(data, default=default)
174+
>>> packed = msgpack.packb(data, default=default, use_bin_type=True)
174175
>>> unpacked = msgpack.unpackb(packed, ext_hook=ext_hook)
175176
>>> data == unpacked
176177
True
@@ -294,7 +295,7 @@ Test
294295
MessagePack uses `pytest` for testing.
295296
Run test with following command:
296297

297-
$ py.test
298+
$ pytest -v test
298299

299300

300301
..

0 commit comments

Comments
 (0)
0