use 'j' instead of 'i' for imaginary constants

This commit is contained in:
Guido van Rossum 1996-01-25 16:21:31 +00:00
parent 1e7b2aa5d6
commit 724187929a

View file

@ -234,9 +234,9 @@ complex_buf_repr(buf, v)
complexobject *v;
{
if (v->cval.real == 0.)
sprintf(buf, "%.12gi", v->cval.imag);
sprintf(buf, "%.12gj", v->cval.imag);
else
sprintf(buf, "(%.12g%+.12gi)", v->cval.real, v->cval.imag);
sprintf(buf, "(%.12g%+.12gj)", v->cval.real, v->cval.imag);
}
static int