Dave Parker a écrit :
Or just:

If command is "quit" ...

Hmmm.  In Flaming Thunder, I'm using "is" (and "is an", "is a", etc)
for assigning and checking types.  For example, to read data from a
file and check for errors:

     Read data from "input.txt".
     If data is an error then go to ...

Arf ! A goto !

Or when assigning a type to an identifier:

     HarmonicMean is a function(x, y) ...
     LoopCount is a variable ...

By using = only for equality and "is" only for types, the Flaming
Thunder compiler can detect when either is being used incorrectly
because the syntax for the two is incompatible.  That avoids the man-
years of wasted debugging time spent on languages that accept
statements that are easily confused, yet syntactically valid (e.g. the
confusion between = and == in C if-statments, or the confusion between
= (equality) and "is" (identity) in Python).


Actually in Python the equality test is '==', not '='. And since Python's types are objects - which is *definitively* a GoodThing(tm) in an OOPL -, your point here is moot.

Also, you're overloading the meaning of 'is', which *is* (pun intented) confusing too.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to