Skip to main content

internal.types.slice

Standard library Module View source
class Slice
@tuple
class Slice[T, U, V]
Fields 6
start Optional[T]
stop Optional[U]
step Optional[V]
T type
U type
V type
Constructors 3
__new__
__new__[U: type = int](stop: Optional[U], /) -> Slice[(int, U, int)]
__new__
@overload
__new__[T: type = int, U: type = int](start: Optional[T], stop: Optional[U], /) -> Slice[(T, U, int)]
__new__
@overload
__new__[T: type = int, U: type = int, V: type = int](start: Optional[T], stop: Optional[U], step: Optional[V], /) -> Slice[(T, U, V)]
Methods 3
adjust_indices
adjust_indices(self: Self, length: int) -> Tuple[(int, int, int, int)]
adjust_indices_helper
adjust_indices_helper(length: int, start: int, stop: int, step: int) -> Tuple[(int, int, int, int)]
indices
indices(self: Self, length: int, /)
Special methods 3
__repr__
@overload
__repr__(self: Self, /)
__eq__
@overload
__eq__(self: Self, other: Slice, /)
__ne__
@overload
__ne__(self: Self, other: Slice, /)
alias slice
slice = Slice
Alias of Slice