def python_3000_not_equal(logical_line):
 pos = logical_line.find('<>')
 if (pos > (-1)):
  (yield (pos, "W603 '<>' is deprecated, use '!='"))

def python_3000_not_equal ( logical_line ) : pos = logical_line . find ( '<>' ) if ( pos > ( - 1 ) ) : ( yield ( pos , "W603 '<>' is deprecated, use '!='" ) )
new code should always use != instead of <> .