[issue1588] str.format() wrongly formats complex() numbers (Py30a2)

Mark Dickinson report at bugs.python.org
Tue Apr 28 11:32:21 CEST 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

> I'm also going to disallow the '%' format code.

Sounds good to me.

> I don't think it makes any sense to convert a complex number to a
> percentage.

Well, I think it's clear what the numbers would be (just scale both real
and imaginary parts by 100 before using fixed-point formatting).  The
real issue whether to have two trailing '%'s or one.

Just being difficult:  I completely agree that '%' should be disallowed
for complex numbers.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1588>
_______________________________________


More information about the Python-bugs-list mailing list