[issue43908] array.array should remain immutable

Serhiy Storchaka report at bugs.python.org
Wed Apr 28 18:05:27 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I am not sure tests are needed here. Immutability of the type is mainly an implementation detail. We keep the types immutable because we don't want users to use the feature of mutating these types. I don't think anything bad will happen if in some Python implementation some of these types are Python classes and are mutable. It is not easy to make a Python class immutable. Users will not intentionally write a code depending on mutability of these types because it does not work in CPython.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43908>
_______________________________________


More information about the Python-bugs-list mailing list