You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
array.array inheriting from MutableSequence has some unintended consequences, such as below
importarrayx=array.array("B")
x.clear()
At runtime array.array does not have .clear(). Is it meant to have a .clear() implemented? Right now at least it doesn't and the stubs give an incorrect definition.
Activity
JelleZijlstra commentedon Nov 10, 2023
This should probably be considered a CPython bug: array claims to be a MutableSequence at runtime, but doesn't implement the full ABC.
mikeziminio commentedon Feb 2, 2024
I have added the issue to the cpython repository: python/cpython#114894