really silly nit: why 3+5j instead of 3+5i?

Konrad Hinsen hinsen at
Mon May 15 05:22:39 EDT 2000

"Tim Peters" <tim_one at> writes:

> [Jeff Petkau]
> > Can anyone tell me why Python uses 'j' instead of 'i' for imaginary
> > numbers?
> Because consensus on this was impossible to reach, and it appeared that more
> people favored "j" than "i" at the time.

Exactly. A bit of history for the youngsters among us: The question of
adding a complex number type to Python came up during the early days
of Numerical Python, in 1995 or so. I wrote the original
implementation patches, which involved a change to the parser (to
recognize imaginary constants) as well as the addition of a new type
and the module cmath. In that version, both i and j (as well as their
upper-case variants) were allowed, trying to please everyone.

There was then a lengthy discussion (in this group) whether the
complex type should become part of the core language at all. The
question was decided by Guido (who else?), who accepted the complex
type but insisted on a single spelling for the constants (except for
case differences, as number constants in Python are not case
sensitive). In a subsequent discussion on the MatrixSIG mailing list,
it turned out that physicists and mathematicians were more flexible
than electrical engineers <, and the j suffix was adopted as the only

we-should-start-writing-a-book-on-the-history-of-Python-ly y'rs  - Konrad.
Konrad Hinsen                            | E-Mail: hinsen at
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-
Rue Charles Sadron                       | Fax:  +33-
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais

More information about the Python-list mailing list