Resizable

class zixy.container.base.Resizable(*args, **kwargs)[source]

Bases: Sized, Protocol

Protocol for Sized classes that support resizing.

__init__(*args, **kwargs)
abstractmethod __len__()
resize(n: int) None[source]

Resize the underlying container.

Parameters:

n – The new size of the container.

Note

This method operates in-place.

Raises:

ValueError – If the container is a view.