alister <alister.nospam.w...@ntlworld.com>:

> It already is a different operator from equality which is ==
>
> perhaps it would have been better if the behaviour of these two
> operators were reversed (= for equality & == for assignment) but i
> suspect that Idea if even considered was quickly discarded as it would
> cause major confusion to programmers who work with multiple languages

Blame it on FORTRAN:

   X = X + 1
   IF (X .EQ. 100) GOTO 999

BASIC took a no-nonsense approach:

   5 LET S = 0 
   10 MAT INPUT V 
   20 LET N = NUM 
   30 IF N = 0 THEN 99 
   40 FOR I = 1 TO N 
   45 LET S = S + V(I) 
   50 NEXT I 
   60 PRINT S/N 
   70 GO TO 5 
   99 END

   (<URL: http://en.wikipedia.org/wiki/BASIC#Examples>)


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to