File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -29,21 +29,20 @@ msgpack provides ``dumps`` and ``loads`` as alias for compatibility with
2929``pack `` and ``dump `` packs to file-like object.
3030``unpack `` and ``load `` unpacks from file-like object.
3131
32+ ::
33+
3234 >>> import msgpack
3335 >>> msgpack.packb([1, 2, 3])
3436 '\x93\x01\x02\x03'
3537 >>> msgpack.unpackb(_)
36- (1, 2, 3)
37-
38+ [1, 2, 3]
3839
39- ``unpack `` unpacks msgpack's array to Python's tuple.
40- To unpack it to list, Use ``use_list `` option.
40+ ``unpack `` unpacks msgpack's array to Python's list, but can unpack to tuple::
4141
42- >>> msgpack.unpackb(b ' \x93\x01\x02\x03 ' , use_list = True )
43- [ 1, 2, 3]
42+ >>> msgpack.unpackb(b'\x93\x01\x02\x03', use_list=False )
43+ ( 1, 2, 3)
4444
45- The default behavior will be changed in the future. (probably 0.4)
46- You should always pass the ``use_list `` keyword argument.
45+ You should always pass the ``use_list `` keyword argument. See performance issues relating to use_list _ below.
4746
4847Read the docstring for other options.
4948
You can’t perform that action at this time.
0 commit comments