◐ Shell
clean mode source ↗

Message 392291 - Python tracker

IMO, we can drop most (all?) of the huge comment before the check in object_set_class(). History is preserved in the git log. Contrary to Py_TPFLAGS_HEAPTYPE, using Py_TPFLAGS_IMMUTABLETYPE speaks for itself. We might reduce it to just refer to to bpo-43908 and bpo-24912.

Something a la this:
/* Historically, only static types were immutable.
 * Py_TPFLAGS_IMMUTABLETYPE was introduced in Python 3.10.
 * See bpo-43908 and bpo-24912. */

What do you think?