mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 12:03:15 +00:00
update readme (#605)
This commit is contained in:
parent
72e65feb0e
commit
3da5818a3a
1 changed files with 4 additions and 11 deletions
15
README.md
15
README.md
|
@ -49,17 +49,7 @@ msgpack provides `dumps` and `loads` as an alias for compatibility with
|
|||
[1, 2, 3]
|
||||
```
|
||||
|
||||
`unpack` unpacks msgpack's array to Python's list, but can also unpack to tuple:
|
||||
|
||||
```pycon
|
||||
>>> msgpack.unpackb(b'\x93\x01\x02\x03', use_list=False)
|
||||
(1, 2, 3)
|
||||
```
|
||||
|
||||
You should always specify the `use_list` keyword argument for backward compatibility.
|
||||
See performance issues relating to `use_list option`_ below.
|
||||
|
||||
Read the docstring for other options.
|
||||
Read the docstring for options.
|
||||
|
||||
|
||||
### Streaming unpacking
|
||||
|
@ -116,6 +106,9 @@ this_dict_again = msgpack.unpackb(packed_dict, object_hook=decode_datetime)
|
|||
`object_pairs_hook` callback may instead be used to receive a list of
|
||||
key-value pairs.
|
||||
|
||||
NOTE: msgpack can encode datetime with tzinfo into standard ext type for now.
|
||||
See `datetime` option in `Packer` docstring.
|
||||
|
||||
|
||||
### Extended types
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue