Skip to content

collections.deque doesn't have __reversed__ method #2836

Closed

Description

@DimitrisJim

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.

Activity

  1. self-assigned this
    on Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions