[Python-ideas] π = math.pi

Stephan Houben stephanh42 at gmail.com
Thu Jun 1 10:52:28 EDT 2017


Hi Masayuki,

I admit that my understanding of this issue is very limited.

Nevertheless, I would like to point out that the encoding assumed for a
Python3 source file never depends on the locale.

My understanding is that in the default encoding for Python source files
(utf-8), East Asian Ambiguous characters must be assumed narrow. Now there
are also legacy encodings where they are fullwidth. But it is always
determined by the encoding, which in turn is specified or implied in the
source file.

So I don't actually see an issue here.
Am I missing something?

Stephan




Op 1 jun. 2017 16:08 schreef "Masayuki YAMAMOTO" <ma3yuki.8mamo10 at gmail.com
>:

The width of Greek letters is East Asian Ambiguous. Using ambiguous width
characters possibly will be a reason that is source code layout break on
specific locale.

Masayuki

2017-06-01 15:47 GMT+09:00 Serhiy Storchaka <storchaka at gmail.com>:

> 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170601/ff17e1d2/attachment-0001.html>


More information about the Python-ideas mailing list