internal.types.collections.bytearray

Standard library module View source
class bytearray
class bytearray
Constructors 6
__init__
__init__(self)
__init__
__init__(self, size: int)
__init__
__init__(self, source: bytes)
__init__
__init__(self, source: bytearray)
__init__
__init__(self, source: Generator[int])
__init__
__init__(self, source: str, encoding: str, errors: str = "strict")
Methods 56
fromhex
@staticmethod
fromhex(value: str)
fromhex(value: bytes)
fromhex(value: bytearray)
maketrans
@staticmethod
maketrans(source, replacement)
copy
copy(self)
append
append(self, value: int)
extend
extend(self, source: Generator[int])
extend(self, source: bytes)
extend(self, source: bytearray)
insert
insert(self, index: int, value: int)
pop
pop(self, index: int = -1)
remove
remove(self, value: int)
clear
clear(self)
resize
resize(self, size: int)
reverse
reverse(self)
count
count(self, value: int)
count(self, pattern: bytes, start: int = 0, end: Optional[int] = None)
count(self, pattern: bytearray, start: int = 0, end: Optional[int] = None)
index
index(self, value: int, start: int = 0, end: Optional[int] = None)
index(self, pattern: bytes, start: int = 0, end: Optional[int] = None)
index(self, pattern: bytearray, start: int = 0, end: Optional[int] = None)
find
find(self, pattern: bytes, start: int = 0, end: Optional[int] = None)
find(self, pattern: bytearray, start: int = 0, end: Optional[int] = None)
rfind
rfind(self, pattern: bytes, start: int = 0, end: Optional[int] = None)
rfind(self, pattern: bytearray, start: int = 0, end: Optional[int] = None)
rindex
rindex(self, pattern: bytes, start: int = 0, end: Optional[int] = None)
rindex(self, pattern: bytearray, start: int = 0, end: Optional[int] = None)
startswith
startswith(self, prefix: bytes, start: int = 0, end: Optional[int] = None)
startswith(self, prefix: bytearray, start: int = 0, end: Optional[int] = None)
endswith
endswith(self, suffix: bytes, start: int = 0, end: Optional[int] = None)
endswith(self, suffix: bytearray, start: int = 0, end: Optional[int] = None)
removeprefix
removeprefix(self, prefix)
removesuffix
removesuffix(self, suffix)
isdigit
isdigit(self)
islower
islower(self)
isupper
isupper(self)
isalnum
isalnum(self)
isalpha
isalpha(self)
isspace
isspace(self)
istitle
istitle(self)
isdecimal
isdecimal(self)
isascii
isascii(self)
isnumeric
isnumeric(self)
isidentifier
isidentifier(self)
isprintable
isprintable(self)
capitalize
capitalize(self)
lower
lower(self)
upper
upper(self)
casefold
casefold(self)
swapcase
swapcase(self)
title
title(self)
ljust
ljust(self, width: int, fillchar: bytes = " ")
rjust
rjust(self, width: int, fillchar: bytes = " ")
center
center(self, width: int, fillchar: bytes = " ")
zfill
zfill(self, width: int)
lstrip
lstrip(self)
lstrip(self, chars: bytes)
rstrip
rstrip(self)
rstrip(self, chars: bytes)
strip
strip(self)
strip(self, chars: bytes)
partition
partition(self, separator: bytes)
rpartition
rpartition(self, separator: bytes)
split
split(self, separator: Optional[bytes] = None, maxsplit: int = -1)
rsplit
rsplit(self, separator: Optional[bytes] = None, maxsplit: int = -1)
splitlines
splitlines(self, keepends: bool = False)
replace
replace(self, old: bytes, new: bytes, count: int = -1)
expandtabs
expandtabs(self, tabsize: int = 8)
translate
translate(self, table)
translate(self, table: bytes, delete: bytes = "")
translate(self, table: bytearray, delete: bytes = "")
hex
hex(self)
hex(self, sep: str, bytes_per_sep: int = 1)
hex(self, sep: bytes, bytes_per_sep: int = 1)
join
join(self, values: Generator[T], T: type)
join(self, values: List[T], T: type)
decode
decode(self, encoding: str = "utf-8", errors: str = "strict")
Special methods 24
__len__
__len__(self)
__bool__
__bool__(self)
__iter__
__iter__(self)
__reversed__
__reversed__(self)
__getitem__
__getitem__(self, index: int)
__getitem__(self, slice: Slice)
__setitem__
__setitem__(self, slice: Slice, source: Generator[int])
__setitem__(self, index: int, value: int)
__setitem__(self, slice: Slice, source: bytes)
__setitem__(self, slice: Slice, source: bytearray)
__delitem__
__delitem__(self, index: int)
__delitem__(self, slice: Slice)
__contains__
__contains__(self, value: int)
__contains__(self, pattern: bytes)
__contains__(self, pattern: bytearray)
__bytes__
__bytes__(self)
__str__
__str__(self)
__repr__
__repr__(self)
__copy__
__copy__(self)
__deepcopy__
__deepcopy__(self)
__eq__
__eq__(self, other: bytearray)
__eq__(self, other: bytes)
__ne__
__ne__(self, other: bytearray)
__ne__(self, other: bytes)
__lt__
__lt__(self, other: bytearray)
__lt__(self, other: bytes)
__le__
__le__(self, other: bytearray)
__le__(self, other: bytes)
__gt__
__gt__(self, other: bytearray)
__gt__(self, other: bytes)
__ge__
__ge__(self, other: bytearray)
__ge__(self, other: bytes)
__add__
__add__(self, other: bytearray)
__add__(self, other: bytes)
__iadd__
__iadd__(self, other: bytearray)
__iadd__(self, other: bytes)
__mul__
__mul__(self, count: int)
__rmul__
__rmul__(self, count: int)
__imul__
__imul__(self, count: int)
class bytes
@extend
class bytes
Special methods 7
__eq__
__eq__(self, other: bytearray)
__ne__
__ne__(self, other: bytearray)
__add__
__add__(self, other: bytearray)
__lt__
__lt__(self, other: bytearray)
__le__
__le__(self, other: bytearray)
__gt__
__gt__(self, other: bytearray)
__ge__
__ge__(self, other: bytearray)