Mark Dickinson <dicki...@gmail.com> added the comment:

> Maybe if you explicitly ask for the "sign" of a NaN, it should
> always be a space.

Actually, I think '+nan' for format(float('nan'), '+'), and ' nan'
for format(float('nan'), ' ').  Then nans and infs can be treated 
identically, except that the sign of a nan is always considered to be 
positive, regardless of what the _Py_dg_dtoa function returns.

> And when requesting leading zeros, you also get leading spaces
> instead?

Should do the same thing for nans and infs here.  But certainly leading 
zeros should be avoided.  Leading spaces sounds fine to me.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4482>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to