Skip to content

Add array.clear() #114894

Closed
Closed
@mikeziminio

Description

@mikeziminio

Bug report

Bug description:

from array import array

x = array("B")
x.clear()    # AttributeError: 'array.array' object has no attribute 'clear'

But array is a MutableSequence, so we expect the clear() method to be implemented.
If this is correct, then I'm ready to work on PR.

Original issue from the typeshed repository: python/typeshed#11008

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions