Using non-ASCII characters in identifier names is only supported from Python 3.0 onwards. In eariler versions, you can only use them in literal strings and comments.
The use of non-ASCII characters in identifer names is generally discouraged. If someone else tries to read the file (or you try to read it on a different machine), their text editor may not honor the coding clause and try to parse it with a different encoding so that chareacters would not display correctly; or the font the editor is using may not support those code points, so they would just see placeholder glyphs.
If you want to imporve readability of your formulas, break them down into multiple lines e.g.
- Code: Select all
exponent = GAMMA_AIR / (GAMMA_AIR - 1)
ratio = (eff_inlet * air_speed**2) / (2 * CP_AIR * T0_ambient)
P0_comp_in = P0_ambient * (1 + ratio) ** exponent
(obviously, it's better to use names that relate to the formula for the intermediate varibles, rather than "exponent" and "ratio").