ContainerView
- class ContainerView
An immutable view into a native random-access container. Implements Sequence protocol.
Children
Members defined in
ContainerView(11 members)
Whether this container is not empty
Get the value at
index.
Returns the number of
valueoccurrences in this container
Whether this container is empty
Returns the index of
valuein 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
Noneifindexis out-of-bounds.
- at(arg0: int, arg1: syside.T, /) syside.T
Get the value at
index.Returns
arg1ifindexis out-of-bounds.
- count(value: syside.T) int
Returns the number of
valueoccurrences 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
valuein this container.Raises
ValueErrorifvalueis not found.