def global_names_dict_generator(evaluator, scope, position):
 in_func = False
 while (scope is not None):
  if (not ((scope.type == 'classdef') and in_func)):
   for names_dict in scope.names_dicts(True):
    (yield (names_dict, position))
    if hasattr(scope, 'resets_positions'):
     position = None
   if (scope.type == 'funcdef'):
    in_func = True
    position = None
  scope = evaluator.wrap(scope.get_parent_scope())
 for names_dict in evaluator.BUILTINS.names_dicts(True):
  (yield (names_dict, None))

def global_names_dict_generator ( evaluator , scope , position ) : in_func = False while ( scope is not None ) : if ( not ( ( scope . type == 'classdef' ) and in_func ) ) : for names_dict in scope . names_dicts ( True ) : ( yield ( names_dict , position ) ) if hasattr ( scope , 'resets_positions' ) : position = None if ( scope . type == 'funcdef' ) : in_func = True position = None scope = evaluator . wrap ( scope . get_parent_scope ( ) ) for names_dict in evaluator . BUILTINS . names_dicts ( True ) : ( yield ( names_dict , None ) )
for global name lookups .