cbytesparse.c.BlockView

class cbytesparse.c.BlockView

Block viewer.

Memory view around an underlying block slice, implementing Python’s buffer protocol API.

Methods

__init__

capitalize

center

check

Checks for data consistency.

contains

count

decode

endswith

find

index

isalnum

isalpha

isascii

isdecimal

isdigit

isidentifier

islower

isnumeric

isprintable

isspace

istitle

isupper

ljust

lower

lstrip

maketrans

partition

release

Forces object disposal.

removeprefix

removesuffix

replace

rfind

rindex

rjust

rpartition

rstrip

startswith

strip

swapcase

title

tobytes

tolist

toreadonly

translate

upper

zfill

Attributes

acquired

Underlying block currently acquired.

c_contiguous

contiguous

endex

Slice exclusive end address.

endin

Slice inclusive end address.

f_contiguous

format

itemsize

nbytes

ndim

obj

readonly

shape

start

Slice inclusive start address.

strides

suboffsets

__bool__()

True if self else False

__bytes__()

Converts into bytes.

Returns:

bytesbytes clone of the viewed slice.

__contains__(key, /)

Return key in self.

__delitem__(key, /)

Delete self[key].

__eq__(value, /)

Return self==value.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__getitem__(key, /)

Return self[key].

__gt__(value, /)

Return self>value.

__hash__ = None
__init__(*args, **kwargs)
__iter__()

Implement iter(self).

__le__(value, /)

Return self<=value.

__len__()

int: Slice length.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(**kwargs)
__reduce__()

BlockView.__reduce_cython__(self)

__reduce_cython__(self)
__repr__()

Return repr(self).

__reversed__()
__setitem__(key, value, /)

Set self[key] to value.

__setstate__()

BlockView.__setstate_cython__(self, __pyx_state)

__setstate_cython__(self, __pyx_state)
__sizeof__()

int: Allocated byte size.

__str__()

Return str(self).

_memoryview

Python memoryview wrapper.

Type:

memoryview

acquired

Underlying block currently acquired.

Type:

bool

capitalize()
center(width, fillchar, factory)
check()

Checks for data consistency.

contains(token, start, endex)
count(token, start, endex)
decode(encoding, errors)
endex

Slice exclusive end address.

Type:

int

endin

Slice inclusive end address.

Type:

int

endswith(token)
find(token, start, endex)
index(token, start, endex)
isalnum()
isalpha()
isascii()
isdecimal()
isdigit()
isidentifier()
islower()
isnumeric()
isprintable()
isspace()
istitle()
isupper()
ljust(width, fillchar, factory)
lower()
lstrip(chars, factory)
static maketrans(chars_from, chars_to)
partition(sep, factory)
release()

Forces object disposal.

Useful to make sure that any memory blocks are unreferenced before automatic garbage collection.

Any access to the object after calling this function could raise exceptions.

removeprefix(prefix, factory)
removesuffix(suffix, factory)
replace(old, new, count, start, endex)
rfind(token, start, endex)
rindex(token, start, endex)
rjust(width, fillchar, factory)
rpartition(sep, factory)
rstrip(chars, factory)
start

Slice inclusive start address.

Type:

int

startswith(token)
strip(chars, factory)
swapcase()
title()
tobytes()
tolist()
toreadonly()
translate(table)
upper()
zfill(width, factory)