[Python-Dev] various unix platform build/test issues

Tim Peters tim.one@comcast.net
Tue, 18 Feb 2003 11:21:24 -0500


[Tim]
>> 	fo = (PyFloatObject*) (*nb->nb_float) (op);

[Guido]
> No, that code is guarded by a test whether tp_as_number == NULL or
> nb_float is NULL; it issues the expected message "a float is required".

Oops!  You're right, of course.

[Neal, later]
>> The tp_as_number check in default_3way_compare pretty bogus though,
>> IMHO.  With the new type changes a lot of types have a tp_as_number
>> slot.  I think the compare code needs to change.

[Guido]
> Yes, but how?

It's a good question.  All builtin numeric types have a non-NULL nb_float
slot, but some non-numeric types do too (proxies, and even _winreg.c's
PyHKEY_Type).