mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-20 04:13:16 +00:00
Merge pull request #143 from emulbreh/pass-ext-hook
Accept ext_hook for unpack()
This commit is contained in:
commit
aa209ab1e9
1 changed files with 2 additions and 2 deletions
|
@ -147,7 +147,7 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
|
|||
|
||||
def unpack(object stream, object object_hook=None, object list_hook=None,
|
||||
bint use_list=1, encoding=None, unicode_errors="strict",
|
||||
object_pairs_hook=None,
|
||||
object_pairs_hook=None, ext_hook=ExtType
|
||||
):
|
||||
"""
|
||||
Unpack an object from `stream`.
|
||||
|
@ -158,7 +158,7 @@ def unpack(object stream, object object_hook=None, object list_hook=None,
|
|||
"""
|
||||
return unpackb(stream.read(), use_list=use_list,
|
||||
object_hook=object_hook, object_pairs_hook=object_pairs_hook, list_hook=list_hook,
|
||||
encoding=encoding, unicode_errors=unicode_errors,
|
||||
encoding=encoding, unicode_errors=unicode_errors, ext_hook=ext_hook
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue