[issue43908] array.array should remain immutable
STINNER Victor
report at bugs.python.org
Thu Apr 22 09:34:12 EDT 2021
STINNER Victor <vstinner at python.org> added the comment:
> Maybe name it Py_TPFLAGS_IMMUTABLETYPE?
"TPFLAGS" stands for "type flags". So IMO adding "TYPE" suffix is redundant. If tomorrow, we want to add a flag for immutable instance, we can add a new Py_TPFLAGS_IMMUTABLE_INSTANCE flag.
On the other side, TYPE suffix is consistent with other flags :-)
/* Set if the type object is dynamically allocated */
#define Py_TPFLAGS_HEAPTYPE (1UL << 9)
/* Set if the type allows subclassing */
#define Py_TPFLAGS_BASETYPE (1UL << 10)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43908>
_______________________________________
More information about the Python-bugs-list
mailing list