GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add array.clear() · Issue #114894 · python/cpython

Add array.clear() #114894

New issue
Copy link
New issue
Copy link
Closed
Closed
Add array.clear()#114894
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@mikeziminio
mikeziminio
opened on Feb 2, 2024
Issue body actions

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

  • gh-114894: add array.array.clear() method #114919

Activity

  1. mikeziminio
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Feb 2, 2024
  2. mikeziminio
    added a commit that references this issue on Feb 2, 2024

    pythongh-114894: add array.array.clear() method

    be9733a
  3. JelleZijlstra
    added
    type-featureA feature request or enhancementA feature request or enhancement
    and removed
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Feb 3, 2024
  4. JelleZijlstra
    changed the title [-]We need to implement array.clear()[/-] [+]Add array.clear()[/+] on Feb 3, 2024
  5. JelleZijlstra
    added a commit that references this issue on Feb 10, 2024

    gh-114894: add array.array.clear() method (#114919)

    9d1a353
  6. JelleZijlstra commented on Feb 10, 2024

    @JelleZijlstra
    JelleZijlstra
    on Feb 10, 2024
    Member
    More actions

    Thanks for your contribution!

  7. JelleZijlstra
    closed this as completedon Feb 10, 2024
  8. fsc-eriker
    added a commit that references this issue on Feb 14, 2024

    pythongh-114894: add array.array.clear() method (python#114919)

    fe2a0df
  9. serhiy-storchaka
    added this to Struct, memoryview and array issues 🏗️on Jul 13, 2026
  10. github-project-automation
    moved this to Done in Struct, memoryview and array issues 🏗️on Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancementA feature request or enhancement

    Projects

    • Struct, memoryview and array issues 🏗️
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.