On Tue, Dec 30, 2008 at 12:23 PM, James Mills <prolo...@shortcircuit.net.au> wrote: > On Tue, Dec 30, 2008 at 1:19 PM, David Cournapeau <courn...@gmail.com> wrote: > (... snip ...) > >> print '%f' % a # -> print '1.#INF' > > Would this not be controlled by: > 1. float(a) or a.__float__() > 2. tp_print
Bah, I made a mistake in my example: complex('inf') should read float('inf') (complex('inf') does not work). So 1 is out :) If I read correctly the code, tp_print also calls the format_float function (as tp_str, and tp_repr), so it looks like it is not used in that case. cheers, David -- http://mail.python.org/mailman/listinfo/python-list