Hi,

What you are think about adding Unicode aliases for some mathematic
names in the math module? ;-)

math.π = math.pi
math.τ = math.tau
math.Γ = math.gamma
math.ℯ = math.e

Unfortunately we can't use ∞, ∑ and √ as identifiers. :-(

It may be the role of editors to do it if one really want it. I personally use 
the `pretty-mode` emacs mode, it replaces pi, sum, sqrt, None (∅), tau, gamma, 
but not math.e obviously. It replaces some other strings like lambda (λ x: 
...), and is customizable (I added ∈ ∉ for "in" and "not in").

It only "messes" with visual numbers of characters in a line, but flake8 sees 
the correct python thrue flycheck so it reports errors properly, and you're 
still notified you're more than 80 columns long, even if visually there may be 
a longer valid line.
Oh and it's also messing with copying and pasting to share, found myself 
yesterday pasting a "prettyfied" line of code on IRC and it (legitimately) 
surprised someone.

--
Julien Palard
https://mdk.fr
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to