Stefan Krah <ste...@bytereef.org> added the comment:

The feature would violate fundamental Python invariants. If you modify the 
example above:

>>> t = (m,)
>>> b"\001\002\003" in t
True
>>> x[0] = 100
>>> b"\001\002\003" in t
False


This is simply never supposed to happen in Python. If an immutable
object (Bytes) is regarded as being a member of a tuple, it should
stay in that tuple.


The issue has to be fixed on the NumPy side: They could implement
a scheme that allows hashing of a specific ndarray if a new flag
"IMMUTABLE" is set that locks the exporter and all exports.


I don't thing NumPy's current behavior can be regarded as a bug.
As I said, "readonly" never meant "immutable", it was always a
property of a single view.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35548>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to