On Mon, Feb 2, 2009 at 10:36 AM, Nick Coghlan <ncogh...@gmail.com> wrote:
> I'm wondering if Mark should add the exception he recently removed back
> in as a Deprecation Warning when tp_compare is defined, but
> tp_richcompare is not.

This sounds reasonable to me.  A third-party module that implements
tp_compare but not tp_richcompare is almost certainly not going to be
giving the behaviour that its author intended, after 3.0.1.

Currently, the only warning that such an author gets is a possible
compiler warning about incompatible pointer types (type of
tp_compare versus type of tp_reserved), should he/she
happen to recompile and be watching the compiler output closely.

> Such a warning should also be present when
> running with -3 in 2.7 (assuming it isn't already there).

I'm not sure how/whether that would work, given that there are
probably still plenty of 2.7 modules in the distribution that
(quite legitimately) define tp_compare but not tp_richcompare.

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

Reply via email to