
July 21, 2007
7:59 a.m.
Campbell Barton <cbarton@metavr.com> writes:
If PyNumber_Float succeeds, but pyfloat turns out not to be float, then the invalid argument exception is perfectly fine.
Is this possible? - if its a number type I would have thaught it must be able to be converted to a float.
You're right, PyNumber_Float type-checks the return value of tp_as_number->nb_float. I thought I had checked previously and had seen otherwise, but I must have confused it with something else.