parameters: (self, env, target = None, source = None)
return_statement: return tlist, slist
docstring: Create and return lists of target and source nodes.
docstring_summary: Create and return lists of target and source nodes.
docstring_tokens: Create and return lists of target and source nodes .
function: def _create_nodes(self, env, target = None, source = None):
          """Create and return lists of target and source nodes.
          """
          src_suf = self.get_src_suffix(env)
  
          target_factory = env.get_factory(self.target_factory)
          source_factory = env.get_factory(self.source_factory)
  
          source = self._adjustixes(source, None, src_suf)
          slist = env.arg2nodes(source, source_factory)
  
          pre = self.get_prefix(env, slist)
          suf = self.get_suffix(env, slist)
  
          if target is None:
              try:
                  t_from_s = slist[0].target_from_source
              except AttributeError:
                  raise UserError("Do not know how to create a target from source `%s'" % slist[0])
              except IndexError:
                  tlist = []
              else:
                  splitext = lambda S: self.splitext(S,env)
                  tlist = [ t_from_s(pre, suf, splitext) ]
          else:
              target = self._adjustixes(target, pre, suf, self.ensure_suffix)
              tlist = env.arg2nodes(target, target_factory, target=target, source=source)
  
          if self.emitter:
              # The emitter is going to do str(node), but because we're
              # being called *from* a builder invocation, the new targets
              # don't yet have a builder set on them and will look like
              # source files.  Fool the emitter's str() calls by setting
              # up a temporary builder on the new targets.
              new_targets = []
              for t in tlist:
                  if not t.is_derived():
                      t.builder_set(self)
                      new_targets.append(t)
  
              orig_tlist = tlist[:]
              orig_slist = slist[:]
  
              target, source = self.emitter(target=tlist, source=slist, env=env)
  
              # Now delete the temporary builders that we attached to any
              # new targets, so that _node_errors() doesn't do weird stuff
              # to them because it thinks they already have builders.
              for t in new_targets:
                  if t.builder is self:
                      # Only delete the temporary builder if the emitter
                      # didn't change it on us.
                      t.builder_set(None)
  
              # Have to call arg2nodes yet again, since it is legal for
              # emitters to spit out strings as well as Node instances.
              tlist = env.arg2nodes(target, target_factory,
                                    target=orig_tlist, source=orig_slist)
              slist = env.arg2nodes(source, source_factory,
                                    target=orig_tlist, source=orig_slist)
  
          return tlist, slist
function_tokens: def _create_nodes ( self , env , target = None , source = None ) : src_suf = self . get_src_suffix ( env ) target_factory = env . get_factory ( self . target_factory ) source_factory = env . get_factory ( self . source_factory ) source = self . _adjustixes ( source , None , src_suf ) slist = env . arg2nodes ( source , source_factory ) pre = self . get_prefix ( env , slist ) suf = self . get_suffix ( env , slist ) if target is None : try : t_from_s = slist [ 0 ] . target_from_source except AttributeError : raise UserError ( "Do not know how to create a target from source `%s'" % slist [ 0 ] ) except IndexError : tlist = [ ] else : splitext = lambda S : self . splitext ( S , env ) tlist = [ t_from_s ( pre , suf , splitext ) ] else : target = self . _adjustixes ( target , pre , suf , self . ensure_suffix ) tlist = env . arg2nodes ( target , target_factory , target = target , source = source ) if self . emitter : # The emitter is going to do str(node), but because we're # being called *from* a builder invocation, the new targets # don't yet have a builder set on them and will look like # source files.  Fool the emitter's str() calls by setting # up a temporary builder on the new targets. new_targets = [ ] for t in tlist : if not t . is_derived ( ) : t . builder_set ( self ) new_targets . append ( t ) orig_tlist = tlist [ : ] orig_slist = slist [ : ] target , source = self . emitter ( target = tlist , source = slist , env = env ) # Now delete the temporary builders that we attached to any # new targets, so that _node_errors() doesn't do weird stuff # to them because it thinks they already have builders. for t in new_targets : if t . builder is self : # Only delete the temporary builder if the emitter # didn't change it on us. t . builder_set ( None ) # Have to call arg2nodes yet again, since it is legal for # emitters to spit out strings as well as Node instances. tlist = env . arg2nodes ( target , target_factory , target = orig_tlist , source = orig_slist ) slist = env . arg2nodes ( source , source_factory , target = orig_tlist , source = orig_slist ) return tlist , slist