Nick Coghlan <[email protected]> added the comment:
While this thread was amusing to read, *changing* Python from the engineering
notation to mathematical notation for imaginary numbers is not going to happen.
'i' has ambiguity problems relative to '1' and 'l' in too many fonts - 'j', on
the other hand, almost always uses a visually distinct glyph. And whether 'i'
or 'j' seems more natural to you will depend on whether or not you have an
electrical engineering background (as noted earlier in the thread, 'i' refers
to current in electrical engineering).
If you care about the precise formatting of a complex number, write your own
formatting function rather than relying on the exact format produced by
"repr(num)".
Having an alternate constructor for complex objects that was more forgiving
about 'i' vs 'j' also doesn't offer a huge benefit over the simple "x =
complex(arg.replace('i', 'j')".
So while I have some sympathy for mathematicians that are frustrated by having
to train their fingers to hit 'j' instead of 'i', that's not a good enough
reason to change the language syntax or the behaviour of the complex() builtin.
(See also
http://www.boredomandlaziness.org/2011/02/status-quo-wins-stalemate.html)
----------
nosy: +ncoghlan
resolution: remind -> wont fix
stage: -> committed/rejected
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10562>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com