Skip to content

collections.deque doesn't have a __bool__ method. #2837

Closed

Description

@DimitrisJim

Feature

CPython:

>>> from collections import deque
>>> deque().__bool__()
False

RustPython:

>>>>> from collections import deque
>>>>> deque().__bool__()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'deque' object has no attribute '__bool__'

bool for deques currently falls back to using __len__ when it should supply an implementation of __bool__.

Activity

  1. OhBonsai commented on Aug 11, 2021

    @OhBonsai
    Contributor

    Hi, @DimitrisJim assign me plz~~

  2. DimitrisJim commented on Aug 18, 2021

    @DimitrisJim
    MemberAuthor

    bump, any update on this @OhBonsai ?

  3. OhBonsai commented on Aug 20, 2021

    @OhBonsai
    Contributor

    bump, any update on this @OhBonsai ?

    Hi, @DimitrisJim I will update in this weekend~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions