Is it possible to use rev() on a PyTupleIterator to achieve reverse iteration? #3364
Answered
by
adamreichold
AphrosDelos532
asked this question in
Questions
-
Here is my code, let args_iter = args.iter().rev(); Then i got,
|
Beta Was this translation helpful? Give feedback.
Answered by
adamreichold
Aug 3, 2023
Replies: 1 comment 2 replies
-
We have not yet implemented As workaround, maybe |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
AphrosDelos532
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have not yet implemented
DoubleEndedIterator
forPyTupleIterator
which should however be possible. I will open a PR to fix this.As workaround, maybe
PyTuple::as_slice
would work for you? Or in the worst case, usingPyTuple::get_item
to manually index into the tuple?