[Python-ideas] π = math.pi

Stephan Houben stephanh42 at gmail.com
Thu Jun 1 06:09:44 EDT 2017


> How do you write π (pi) with a keyboard on Windows, Linux or macOS?

On macOS, ⌥ P (Option-P) works.

On all platforms:
1. Make sure you are using Vim.
2. In insert mode: Ctrl-K *p

You can also define abbrev's which will allow you to type pi\ and it
gets replaced by π.
See:
https://gist.github.com/stephanh42/fc466e62bfb022a890ff2c4643eaf3a5

I presume Emacs can do something similar.

Or you get this keyboard: https://imgur.com/gallery/tCNvP
;-)

Stephan


2017-06-01 11:49 GMT+02:00 Victor Stinner <victor.stinner at gmail.com>:
> 2017-06-01 8:47 GMT+02: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
>
> How do you write π (pi) with a keyboard on Windows, Linux or macOS?
>
> Victor
> _______________________________________________
> 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