File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,18 @@ class MsgPackPacket(packet.Packet):
99
1010 @classmethod
1111 def configure (cls , dumps_default = None , ext_hook = msgpack .ExtType ):
12+ """Change the default options for msgpack encoding and decoding.
13+
14+ :param dumps_default: a function called for objects that cannot be
15+ serialized by default msgpack. The function
16+ receives one argument, the object to serialize.
17+ It should return a serializable object or a
18+ ``msgpack.ExtType`` instance.
19+ :param ext_hook: a function called when a ``msgpack.ExtType`` object is
20+ seen during decoding. The function receives two
21+ arguments, the code and the data. It should return the
22+ decoded object.
23+ """
1224 class CustomMsgPackPacket (MsgPackPacket ):
1325 dumps_default = None
1426 ext_hook = None
You can’t perform that action at this time.
0 commit comments