def ambiguous_identifier(logical_line, tokens):
 idents_to_avoid = ('l', 'O', 'I')
 (prev_type, prev_text, prev_start, prev_end, __) = tokens[0]
 for (token_type, text, start, end, line) in tokens[1:]:
  ident = pos = None
  if ((token_type == tokenize.OP) and ('=' in text)):
   if (prev_text in idents_to_avoid):
    ident = prev_text
    pos = prev_start
  if (prev_text in ('as', 'global', 'nonlocal')):
   if (text in idents_to_avoid):
    ident = text
    pos = start
  if (prev_text == 'class'):
   if (text in idents_to_avoid):
    (yield (start, ("E742 ambiguous class definition '%s'" % text)))
  if (prev_text == 'def'):
   if (text in idents_to_avoid):
    (yield (start, ("E743 ambiguous function definition '%s'" % text)))
  if ident:
   (yield (pos, ("E741 ambiguous variable name '%s'" % ident)))
  prev_text = text
  prev_start = start

def ambiguous_identifier ( logical_line , tokens ) : idents_to_avoid = ( 'l' , 'O' , 'I' ) ( prev_type , prev_text , prev_start , prev_end , __ ) = tokens [ 0 ] for ( token_type , text , start , end , line ) in tokens [ 1 : ] : ident = pos = None if ( ( token_type == tokenize . OP ) and ( '=' in text ) ) : if ( prev_text in idents_to_avoid ) : ident = prev_text pos = prev_start if ( prev_text in ( 'as' , 'global' , 'nonlocal' ) ) : if ( text in idents_to_avoid ) : ident = text pos = start if ( prev_text == 'class' ) : if ( text in idents_to_avoid ) : ( yield ( start , ( "E742 ambiguous class definition '%s'" % text ) ) ) if ( prev_text == 'def' ) : if ( text in idents_to_avoid ) : ( yield ( start , ( "E743 ambiguous function definition '%s'" % text ) ) ) if ident : ( yield ( pos , ( "E741 ambiguous variable name '%s'" % ident ) ) ) prev_text = text prev_start = start
never use the characters l .