Skip to content

Commit 9e70dd0

Browse files
committed
Make documentation better
1 parent 495b5a0 commit 9e70dd0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

rawsocketpy/util.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ def to_bytes(*data):
7171
>>> to_bytes("123")
7272
bytearray(b'123')
7373
>>> to_bytes(1, 2, 3)
74-
bytearray(b'\x01\x02\x03')
75-
>>> to_bytes("\xff", "\x01\x02")
76-
bytearray(b'\xff\x01\x02')
74+
bytearray(b'\\x01\\x02\\x03')
75+
>>> to_bytes("\\xff", "\\x01\\x02")
76+
bytearray(b'\\xff\\x01\\x02')
7777
>>> to_bytes(1, 2, 3, [4,5,6])
78-
bytearray(b'\x01\x02\x03\x04\x05\x06')
79-
>>> to_bytes(bytes([1,3,4]), bytearray([6,7,8]), "\xff")
80-
bytearray(b'\x01\x03\x04\x06\x07\x08\xff')
78+
bytearray(b'\\x01\\x02\\x03\\x04\\x05\\x06')
79+
>>> to_bytes(bytes([1,3,4]), bytearray([6,7,8]), "\\xff")
80+
bytearray(b'\\x01\\x03\\x04\\x06\\x07\\x08\\xff')
8181
"""
8282
result = bytearray()
8383
for d in data:

0 commit comments

Comments
 (0)