Using non-ascii symbols

Christoph Zwerschke cito at online.de
Thu Jan 26 18:32:05 EST 2006


Claudio Grondi wrote:
> Speaking maybe only for myself:
> I don't like implicit rules, so I don't like also any  precedence 
> hierarchy being in action, so for safety reasons I always write even 
> 8+6*2 (==20) as 8+(6*2) to be sure all will go the way I expect it.

But for people who often use mathematical formulas this looks pretty 
weird. If it wasn't a programming language, you wouldn't write an 
asterik even, but either a mid dot or nothing. The latter is possible 
because contrary to programming languages, you usually use one-letter 
names in formulas, so it is clear that ab means a*b, and does not 
designate a variable with the name "ab". x**2+y**2+(2*pi*r) looks way 
uglier than x²+y²+2πr (another appication for greek letters). Maybe 
providing a "formula" or "math style" mode would be sometimes helpful. 
Or maybe not, because other conventions of mathematical formulas (long 
fraction strokes, using subscript indices and superscript exponents 
etc.) couldn't be solved so easily anyway. You would need editors with 
the ability to display and input "formula sections" in Python programs 
differently. Python would become something like "executable TeX" rather 
than "executable pseudo code"...

-- Christoph



More information about the Python-list mailing list