Marc-Andre Lemburg <m...@egenix.com> added the comment: Mark Dickinson wrote: > > Mark Dickinson <dicki...@gmail.com> added the comment: > > In all seriousness, the idea of accepting both 'i' and 'j' in complex() isn't > horrible. I'm personally -0.small on it, mostly because it seems likely to > lead to more objections about the complex str() and repr() *output* > containing 'j's. I still think python-ideas would be a more appropriate > place for that discussion, though.
I think this falls under a "locale" problem of some sort... engineers like 'j', mathematician prefer 'i'. Personally, I think it's more important to be able to read scientific data easily without too many problems, then to be able to write the processed data in exactly the same way it was read. When formatting complex numbers, you have the issues of whether to include spaces, parens, 'i' or 'j', so this is better left to a application space function to deal with, IMHO. I would prefer to have str() and repr() always use the parens and j notation - it makes recognizing complex numbers easier, e.g. compare (1+0j) >>> 0+1j 1j >>> 11 11 to (1+0j) >>> 0+1j (0+1j) >>> 11 11 (but I guess that another problem) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10562> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com