avl._core.list module
- class avl._core.list.List(*args: list[Any])[source]
- __init__(*args: list[Any]) None[source]
Initializes the List.
- Parameters:
args (list[Any]) – Initial elements of the list.
- append(data: Any) None[source]
Appends an element to the list and sets the event.
- Parameters:
data (Any) – The element to be appended.
- extend(iterable: list[Any]) None[source]
Extends the list with elements from an iterable and sets the event.
- Parameters:
iterable (list[Any]) – The iterable to extend the list with.
- insert(index: int, data: Any) None[source]
Inserts an element at a given position in the list and sets the event.
- Parameters:
index (int) – Position at which to insert the element.
data (Any) – The element to be inserted.
- pop(index: int = -1) Any[source]
Pops an element from the list at a given position.
- Parameters:
index (int) – Position from which to pop the element. Defaults to -1 (last element).
- Returns:
The popped element.
- Return type:
Any
- remove(data: Any) None[source]
Removes the first occurrence of an element from the list and sets the event.
- Parameters:
data (Any) – The element to be removed.