def infer_name(self, context=None):
 (frame, stmts) = self.lookup(self.name)
 if (not stmts):
  parent_function = _higher_function_scope(self.scope())
  if parent_function:
   (_, stmts) = parent_function.lookup(self.name)
  if (not stmts):
   raise UnresolvableName(self.name)
 context = context.clone()
 context.lookupname = self.name
 return _infer_stmts(stmts, context, frame)

def infer_name ( self , context = None ) : ( frame , stmts ) = self . lookup ( self . name ) if ( not stmts ) : parent_function = _higher_function_scope ( self . scope ( ) ) if parent_function : ( _ , stmts ) = parent_function . lookup ( self . name ) if ( not stmts ) : raise UnresolvableName ( self . name ) context = context . clone ( ) context . lookupname = self . name return _infer_stmts ( stmts , context , frame )
infer a name: use name lookup rules .