Skip to content

collections.deque doesn't have __reversed__ method #2836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #2812
DimitrisJim opened this issue Aug 10, 2021 · 0 comments · Fixed by #2887
Closed
Tracked by #2812

collections.deque doesn't have __reversed__ method #2836

DimitrisJim opened this issue Aug 10, 2021 · 0 comments · Fixed by #2887
Assignees

Comments

@DimitrisJim
Copy link
Member

DimitrisJim commented Aug 10, 2021

Feature

CPython:

>>> from collections import deque
>>> reversed(deque(range(3))
<_collections._deque_reverse_iterator at 0x7fec6d2fff40>

RustPython:

>>>>> from collections import deque
>>>>> reversed(deque(range(3))
<iter object at 0x5622a0d03340>

reversed(deque) currently falls back to a generic iterator instead of having a specific deque_reverse_iterator type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant