On Sat, Jan 31, 2009 at 3:07 PM, Mark Dickinson <dicki...@gmail.com> wrote:
> Once the cmp removal is complete, the type object's tp_compare
> slot will no longer be used.  The current plan is to rename it to
> tp_reserved, change its type to (void *), and raise TypeError when
> initializing any type that attempts to put something nonzero into
> that slot.  But another possibility would be to remove it entirely.
> So...

I think we should keep as tp_reserved in 3.0.1. In 3.1, as I mentioned
in the issue, I'd like to reuse it as a slot for __bytes__. Confusion
could be avoided still raising a TypeError for a non-null tp_reserved
slot unless the type has Py_TPFLAGS_HAVE_BYTES flag set. After a
while, we could just make it default.

>
> N.B. The same questions apply to nb_reserved (which used
> to be nb_long) in the PyNumberMethods structure.

IMO, it's fine to keep them around, just in case.



-- 
Regards,
Benjamin
_______________________________________________
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