ContainerView

class ContainerView

An immutable view into a native random-access container. Implements Sequence protocol.

Children
Members defined in ContainerView (11 members)

__bool__

Whether this container is not empty

__contains__

__getitem__

__iter__

__len__

__reversed__

__str__

at

Get the value at index.

count

Returns the number of value occurrences in this container

empty

Whether this container is empty

index

Returns the index of value in this container.

Methods

__bool__() bool

Whether this container is not empty

__contains__(value: object) bool
__getitem__(index: int) syside.T
__getitem__(index: slice) list[syside.T]
__iter__() Iterator[syside.T]
__len__() int
__reversed__() Iterator[syside.T]
__str__() str
at(arg: int, /) syside.T | None

Get the value at index.

Returns None if index is out-of-bounds.

at(arg0: int, arg1: syside.T, /) syside.T

Get the value at index.

Returns arg1 if index is out-of-bounds.

count(value: syside.T) int

Returns the number of value occurrences in this container

empty() bool

Whether this container is empty

index(value: syside.T, start: int = 0, stop: int | None = None) int

Returns the index of value in this container.

Raises ValueError if value is not found.

Used in