..I find that when coding very "math-heavy" function in python one way of making the code more readable (to me at least) is by following the literature as tightly as possible, including using the greek letters such as Ω, θ, φ, ψ, ω, ϕ etc.
And the code works as expected, but PyCharm highlights those characters and says "non-ASCII characters in identifier".
..without referencing any PEP (Python coding standard).
I'm asking for sober arguments as to why I should refrain from using non-ASCII characters in identifiers.
Because they're not included in a standard qwerty keyboard and would be a pain in the arse to keep referring to in your code.
You're better off just referring to them by their ascii equivalents (the string alpha
etc.) and letting intellisense in modern ide's handle the typing.
If you're looking for a pep standard, you probably want PEP 3131
Should identifiers be allowed to contain any Unicode letter?
Drawbacks of allowing non-ASCII identifiers wholesale:
- Python will lose the ability to make a reliable round trip to a human-readable display on screen or on paper.
- Python will become vulnerable to a new class of security exploits; code and submitted patches will be much harder to inspect.
- Humans will no longer be able to validate Python syntax.
- Unicode is young; its problems are not yet well understood and solved; tool support is weak.
- Languages with non-ASCII identifiers use different character sets and normalization schemes; PEP 3131's choices are non-obvious.
- The Unicode bidi algorithm yields an extremely confusing display order for RTL text when digits or operators are nearby.
Of course this has been accepted so its pycharm's decision, not pep.