1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# ruff: noqa: D205
"""A `bytes`-like buffer.
This implements the Python buffer protocol, allowing zero-copy access
to underlying Rust memory.
You can pass this to `memoryview` for a zero-copy view into the underlying
data or to `bytes` to copy the underlying data into a Python `bytes`.
Many methods from the Python `bytes` class are implemented on this,
"""
"""Construct a new Bytes object.
This will be a zero-copy view on the Python byte slice.
"""
...
...
...
...
...
...
...
...
...
"""If the binary data starts with the prefix string, return `bytes[len(prefix):]`.
Otherwise, return the original binary data.
"""
"""If the binary data ends with the suffix string and that suffix is not empty,
return `bytes[:-len(suffix)]`. Otherwise, return the original binary data.
"""
"""Return `True` if all bytes in the sequence are alphabetical ASCII characters or
ASCII decimal digits and the sequence is not empty, `False` otherwise.
Alphabetic ASCII characters are those byte values in the sequence
`b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'`. ASCII decimal digits
are those byte values in the sequence `b'0123456789'`.
"""
"""Return `True` if all bytes in the sequence are alphabetic ASCII characters and
the sequence is not empty, `False` otherwise.
Alphabetic ASCII characters are those byte values in the sequence
`b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'`.
"""
"""Return `True` if the sequence is empty or all bytes in the sequence are ASCII,
`False` otherwise.
ASCII bytes are in the range `0-0x7F`.
"""
"""Return `True` if all bytes in the sequence are ASCII decimal digits and the
sequence is not empty, `False` otherwise.
ASCII decimal digits are those byte values in the sequence `b'0123456789'`.
"""
"""Return `True` if there is at least one lowercase ASCII character in the sequence
and no uppercase ASCII characters, `False` otherwise.
"""
r"""Return `True` if all bytes in the sequence are ASCII whitespace and the sequence
is not empty, `False` otherwise.
ASCII whitespace characters are those byte values
in the sequence `b' \t\n\r\x0b\f'` (space, tab, newline, carriage return,
vertical tab, form feed).
"""
"""Return `True` if there is at least one uppercase alphabetic ASCII character in
the sequence and no lowercase ASCII characters, `False` otherwise.
"""
"""Return a copy of the sequence with all the uppercase ASCII characters converted
to their corresponding lowercase counterpart.
"""
"""Return a copy of the sequence with all the lowercase ASCII characters converted
to their corresponding uppercase counterpart.
"""
"""Copy this buffer's contents into a Python `bytes` object."""