Skip to content

module internal.types.range

Source: stdlib/internal/types/range.codon


range @tuple Class is named tuple (cannot write fields)

Fields

start: int

stop: int

step: int

Magic methods

__new__(start: int, stop: int) @overload Function is overloaded

__new__(stop: int) @overload Function is overloaded

__new__(start: int, stop: int, step: int) @overload Function is overloaded

__getitem__(self, idx: int) @overload Function is overloaded

__getitem__(self, s: Slice) @overload Function is overloaded

__contains__(self, idx: int)

__iter__(self) @overload Function is overloaded

__len__(self) @overload Function is overloaded

__bool__(self)

__reversed__(self)

__repr__(self) @overload Function is overloaded

Methods

index(self, n: int)

count(self, n: int)