Mojo trait
ReversibleRange
The ReversibleRange
trait describes a range that can be reversed.
Any type that conforms to ReversibleRange
works with the builtin
reversed()
functions.
The ReversibleRange
trait requires the type to define the __reversed__()
method.
Note: iterators are currently non-raising.
Implemented traits
AnyType
Methods
__reversed__
__reversed__(self: _Self) -> _StridedRange
Get a reversed iterator for the type.
Note: iterators are currently non-raising.
Returns:
The reversed iterator of the type.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!