On Sun, 17 Dec 2017 21:07:02 -0500
Random832 <random...@fastmail.com> wrote:
> 
> Is there any practical for of having the flag off for one slot and on
> for another slot that's been added later?
> 
> Could this be replaced (that is, a slot for such a thing added before
> it's too late) with a simple counter that goes up with each version, and
> any "unused" slot should have NULL or some other sentinel value?

Any replacement here would break binary compatibility, which is what
those flags are precisely meant to avoid.

> If it
> really is important to have the flags themselves, just add another set
> of flags - Py_TPFLAGS_HAVE_MORE_FLAGS.

Yes, we could... but it's more complication again.

That said, if we decide to drop cross-version compatibility, we then
are allowed to enlarge the tp_flags field to, say, 64 bits.

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to