[Python-ideas] π = math.pi

Brice PARENT contact at brice.xyz
Thu Jun 1 03:17:28 EDT 2017


Why not simply use

from math import pi as π

and so on? It makes your math formulas more readable (taking out the 
"math." entirely), without requiring any change to the module.


Le 01/06/17 à 08:47, Serhiy Storchaka a écrit :
> 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. :-(
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/



More information about the Python-ideas mailing list