Using non-ascii symbols

Claudio Grondi claudio.grondi at freenet.de
Tue Jan 24 12:13:55 EST 2006


Christoph Zwerschke wrote:
> Juho Schultz wrote:
> 
>> Fortran 90 allowed >, >= instead of .GT., .GE. of Fortran 77. But F90 
>> uses ! as comment symbol and therefore need /= instead of != for 
>> inequality. I guess just because they wanted. However, it is one more 
>> needless detail to remember. Same with the suggested operators.
> 
> 
> The point is that it is just *not* the same. The suggested operators are 
> universal symbols (unicode). Nobody would use ≠ as a comment sign. No 
> need to remember was it .NE. or -ne or <> or != or /= ...
> 
> There is also this old dispute of using "=" for both the assignment 
> operator and equality and how it can confuse newcomers and cause errors. 
>  A consequent use of unicode could solve this problem:
> 
Being involved in the discussion about assignment and looking for new 
terms which do not cause confusion when explaining what assignment does, 
this proposal seems to be a kind of solution:

> a ← b # Assignment (now "a = b" in Python, a := b in Pascal)
     ^-- this seems to me to be still open for further proposals and 
discussion. There is no symbol coming to my mind, but I would be glad if 
it would express, that 'a' becomes a reference to a Python object being 
currently referred by the identifier 'b' (maybe some kind of <-> ?).
> a = b # Eqality (now "a == b" in Python, a = b in Pascal)
> a ≡ b # Identity (now "a is b" in Python, @a = @b in Pascal)
> a ≈ b # Approximately equal (may be interesting for floats)
     ^-- this three seem to me to be obvious and don't need to be 
further discussed (only implemented as the time for such things will come).

Claudio
> 
> (I know this goes one step further as it is incompatible to the existing 
> use of the = sign in Python).
> 
> Another aspect: Supporting such symbols would also be in accord with 
> Python's trait of being "executable pseudo code."
> 
> -- Christoph



More information about the Python-list mailing list