[Python-Dev] Removing tp_compare?

"Martin v. Löwis" martin at v.loewis.de
Sat Jan 31 22:28:22 CET 2009


> (1) Is it desirable to remove tp_compare entirely, instead of
> just renaming it?

No.

> (2) If so, for which Python version should that removal take place?
> 3.0.1?  3.1.0?  4.0?

If it is removed, it definitely shouldn't be removed in 3.0.1; that
would be a binary-incompatible change.

> (3) In the meantime, what should the renamed slot be called?
> tp_reserved?  In the issue 1717 discussion, Raymond suggested
> tp_deprecated_compare.

tp_reserved sounds fine. In 3.0.1, filling it with a function pointer
should give no error, since that would be a binary-incompatible change.

> Any thoughts?  My own opinion is that it really doesn't matter
> that much if the slot is left in;  it's just a little annoying to have
> such backwards-compatibility baggage already present in
> the shiny new 3.0 series.  A little like finding a big scratch
> on your brand-new bright yellow Hummer H3.  Or not.

Well, there is also PY_SSIZE_T_CLEAN. I asked before 3.0, and was told
that it was too late to remove it.

Regards,
Martin


More information about the Python-Dev mailing list