]> granicus.if.org Git - python/commitdiff
use 'j' instead of 'i' for imaginary constants
authorGuido van Rossum <guido@python.org>
Thu, 25 Jan 1996 16:21:31 +0000 (16:21 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 25 Jan 1996 16:21:31 +0000 (16:21 +0000)
Objects/complexobject.c

index 391b80ef3eb758451407903a09a15d8975b25687..82a779b26f1744b84d82986fd049f132eefab30e 100644 (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