[Python-ideas] π = math.pi

Stephan Houben stephanh42 at gmail.com
Thu Jun 1 03:20:51 EDT 2017


Hi all,

Two remarks:

1. Note that ℯ also doesn't really work. While you can assign to this
identifier, it actually gets normalized into a plain "e".

2. Unicode has a
    Σ : GREEK CAPITAL LETTER SIGMA
   and a
    ∑ : N-ARY SUMMATION
   The first is a valid Python identifier, the second not.
Unfortunately, the second has the desired semantics...

Stephan



2017-06-01 9:14 GMT+02:00 Ivan Levkivskyi <levkivskyi at gmail.com>:
> Although it is trivial, I like the idea (except for math.e maybe).
> (And it would be cool to be able to also write ∑ = sum, etc.)
>
> --
> Ivan
>
>
>
> On 1 June 2017 at 08:47, Serhiy Storchaka <storchaka at gmail.com> wrote:
>>
>> 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/
>
>
>
> _______________________________________________
> 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