Georg Brandl <ge...@python.org> added the comment:

We also should consider a good roadmap to account for the eventual support of 
quaternions in the language syntax.

Since the conventional mathematical symbols for the additional imaginary units 
of quaternions are j and k, confusion is bound to happen.

My preferred solution is to limit PYTHONIMAGINARYSYMBOL values to "i", "j" or 
"k" in Python 3.4.  The two additional imaginary unit symbols would then be a 
cyclic permutation of i,j,k, viz. for PYTHONIMAGINARYSYMBOL=j, the units are k 
and i.

This deterministic approach has the advantage that migration of code from one 
imaginary symbol to another is as easy as:

sed -e 's/k/l/' -e 's/j/k/' -e 's/i/j/' -e 's/l/i/'

provided that you restrict yourself not to use the characters i, j, k or l in 
identifiers, keywords or strings in the source code.

----------
nosy: +georg.brandl

_______________________________________
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

Reply via email to