The following test routine shows problems with
comparing vectors with scalars:
R = vector(1,2,3)
if R == 3: # no error message!
print 'a'
if 3 == R: # RuntimeError: Extension object missing a
required method.
print 'b'
Getting no error message or getting an unintelligible
one -- both unsatisfactory.
Logged In: YES
user_id=676765
'if (R==3):' works correctly. Dynamic typing is at work here.
R clearly is not equal to '3', and the return value of the
expression is false (0).
Relational comparisons with a vector as the left operand and
a scalar as the right operand will be supported in Visual 3.0