mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-22 13:23:17 +00:00
Revert "Move unpack() from each implementation to __init__. (#286)"
This reverts commit da902f9c1d
.
This commit is contained in:
parent
9bf38105f7
commit
9455fccc52
3 changed files with 39 additions and 14 deletions
|
@ -100,6 +100,16 @@ def _get_data_from_buffer(obj):
|
|||
return view
|
||||
|
||||
|
||||
def unpack(stream, **kwargs):
|
||||
"""
|
||||
Unpack an object from `stream`.
|
||||
|
||||
Raises `ExtraData` when `packed` contains extra bytes.
|
||||
See :class:`Unpacker` for options.
|
||||
"""
|
||||
data = stream.read()
|
||||
return unpackb(data, **kwargs)
|
||||
|
||||
|
||||
def unpackb(packed, **kwargs):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue