mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
use 'j' instead of 'i' for imaginary constants
This commit is contained in:
parent
1e7b2aa5d6
commit
724187929a
1 changed files with 2 additions and 2 deletions
|
|
@ -234,9 +234,9 @@ complex_buf_repr(buf, v)
|
||||||
complexobject *v;
|
complexobject *v;
|
||||||
{
|
{
|
||||||
if (v->cval.real == 0.)
|
if (v->cval.real == 0.)
|
||||||
sprintf(buf, "%.12gi", v->cval.imag);
|
sprintf(buf, "%.12gj", v->cval.imag);
|
||||||
else
|
else
|
||||||
sprintf(buf, "(%.12g%+.12gi)", v->cval.real, v->cval.imag);
|
sprintf(buf, "(%.12g%+.12gj)", v->cval.real, v->cval.imag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue