Skip to content

Commit 35edfad

Browse files
docstrings
1 parent c7b8729 commit 35edfad

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/socketio/msgpack_packet.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)