from typing import TypeVar, Generic, Iterable, Iterator, overload
from mypy_extensions import i64

T = TypeVar("T")

class vec(Generic[T]):
    @overload
    def __init__(self, *, capacity: i64 = ...) -> None: ...
    @overload
    def __init__(self, items: Iterable[T], /, *, capacity: i64 = ...) -> None: ...
    def __len__(self) -> i64: ...
    @overload
    def __getitem__(self, i: i64, /) -> T: ...
    @overload
    def __getitem__(self, i: slice, /) -> vec[T]: ...
    def __setitem__(self, i: i64, o: T, /) -> None: ...
    def __contains__(self, o: object, /) -> bool: ...
    def __iter__(self) -> Iterator[T]: ...
    def __buffer__(self, flags: int, /) -> memoryview: ...

def append(v: vec[T], o: T, /) -> vec[T]: ...
def remove(v: vec[T], o: T, /) -> vec[T]: ...
def pop(v: vec[T], i: i64 = -1, /) -> tuple[vec[T], T]: ...
def extend(v: vec[T], o: Iterable[T], /) -> vec[T]: ...
