def whitespace_around_operator(logical_line):
 for match in OPERATOR_REGEX.finditer(logical_line):
  (before, after) = match.groups()
  if (' DCTB ' in before):
   (yield (match.start(1), 'E223 tab before operator'))
  elif (len(before) > 1):
   (yield (match.start(1), 'E221 multiple spaces before operator'))
  if (' DCTB ' in after):
   (yield (match.start(2), 'E224 tab after operator'))
  elif (len(after) > 1):
   (yield (match.start(2), 'E222 multiple spaces after operator'))

def whitespace_around_operator ( logical_line ) : for match in OPERATOR_REGEX . finditer ( logical_line ) : ( before , after ) = match . groups ( ) if ( ' DCTB ' in before ) : ( yield ( match . start ( 1 ) , 'E223 tab before operator' ) ) elif ( len ( before ) > 1 ) : ( yield ( match . start ( 1 ) , 'E221 multiple spaces before operator' ) ) if ( ' DCTB ' in after ) : ( yield ( match . start ( 2 ) , 'E224 tab after operator' ) ) elif ( len ( after ) > 1 ) : ( yield ( match . start ( 2 ) , 'E222 multiple spaces after operator' ) )
avoid extraneous whitespace around an operator .