def filter_private_variable(scope, origin_node):
 instance = scope.get_parent_scope()
 coming_from = origin_node
 while ((coming_from is not None) and (not isinstance(coming_from, (tree.Class, compiled.CompiledObject)))):
  coming_from = coming_from.get_parent_scope()
 if isinstance(instance, compiled.CompiledObject):
  return (instance != coming_from)
 else:
  return (isinstance(instance, er.Instance) and (instance.base.base != coming_from))

def filter_private_variable ( scope , origin_node ) : instance = scope . get_parent_scope ( ) coming_from = origin_node while ( ( coming_from is not None ) and ( not isinstance ( coming_from , ( tree . Class , compiled . CompiledObject ) ) ) ) : coming_from = coming_from . get_parent_scope ( ) if isinstance ( instance , compiled . CompiledObject ) : return ( instance != coming_from ) else : return ( isinstance ( instance , er . Instance ) and ( instance . base . base != coming_from ) )
check if a variable is defined inside the same class or outside .