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โ
Required methodsโ
__reversed__โ
__reversed__(self: _Self) -> _StridedRange
Get a reversed iterator for the type.
Note: iterators are currently non-raising.
Returns:
_StridedRange: 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!