On May 21, 4:15 pm, Dave Parker <[EMAIL PROTECTED]> wrote: > > 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 ... > > 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). > [snip] I wonder whether "is" could be used both for "x is value" and "x is a type" without causing a problem:
If command is a string ... If command is "quit" ... -- http://mail.python.org/mailman/listinfo/python-list