parameters: (self)
return_statement: return helpers.FakeName(str(i.namespace_names[1]), new)
docstring: Generates an Import statement, that can be used to fake nested imports.
docstring_summary: Generates an Import statement, that can be used to fake nested imports.
docstring_tokens: Generates an Import statement that can be used to fake nested imports .
function: def _get_nested_import_name(self):
          """
          Generates an Import statement, that can be used to fake nested imports.
          """
          i = self._nested_import
          # This is not an existing Import statement. Therefore, set position to
          # 0 (0 is not a valid line number).
          zero = (0, 0)
          names = [unicode(name) for name in i.namespace_names[1:]]
          name = helpers.FakeName(names, self._nested_import)
          new = tree.Import(i._sub_module, zero, zero, name)
          new.parent = self._module
          debug.dbg('Generated a nested import: %s', new)
          return helpers.FakeName(str(i.namespace_names[1]), new)
function_tokens: def _get_nested_import_name ( self ) : i = self . _nested_import # This is not an existing Import statement. Therefore, set position to # 0 (0 is not a valid line number). zero = ( 0 , 0 ) names = [ unicode ( name ) for name in i . namespace_names [ 1 : ] ] name = helpers . FakeName ( names , self . _nested_import ) new = tree . Import ( i . _sub_module , zero , zero , name ) new . parent = self . _module debug . dbg ( 'Generated a nested import: %s' , new ) return helpers . FakeName ( str ( i . namespace_names [ 1 ] ) , new )