diff options
author | INADA Naoki <songofacandy@gmail.com> | 2018-01-09 22:03:06 +0900 |
---|---|---|
committer | INADA Naoki <songofacandy@gmail.com> | 2018-01-09 22:03:06 +0900 |
commit | ab66c272b03805fd16f0346238e8b7d1233b96c4 (patch) | |
tree | 84cfdd5839dd533bdd43b8ec367fd3274d346d11 | |
parent | e0934355c6534690d3c80ea8659d51c65a55ee0f (diff) | |
download | msgpack-python-ab66c272b03805fd16f0346238e8b7d1233b96c4.tar.gz |
Update README
-rw-r--r-- | README.rst | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -148,6 +148,7 @@ It is also possible to pack/unpack custom data types. Here is an example for ``object_pairs_hook`` callback may instead be used to receive a list of key-value pairs. + Extended types ^^^^^^^^^^^^^^ @@ -170,7 +171,7 @@ It is also possible to pack/unpack custom data types using the **ext** type. ... return ExtType(code, data) ... >>> data = array.array('d', [1.2, 3.4]) - >>> packed = msgpack.packb(data, default=default) + >>> packed = msgpack.packb(data, default=default, use_bin_type=True) >>> unpacked = msgpack.unpackb(packed, ext_hook=ext_hook) >>> data == unpacked True @@ -294,7 +295,7 @@ Test MessagePack uses `pytest` for testing. Run test with following command: - $ py.test + $ pytest -v test .. |