Keyword Arguments

SCons also allows you to identify the output file and input source files using Python keyword arguments. The output file is known as the target, and the source file(s) are known (logically enough) as the source. The Python syntax for this is:

      list = Split('main.c file1.c file2.')
      Program(target = 'program', source = list)
   

Because the keywords explicitly identify what each argument is, you can actually reverse the order if you prefer:

      list = Split('main.c file1.c file2.')
      Program(source = list, target = 'program')
   

Whether or not you choose to use keyword arguments to identify the target and source files, and the order in which you specify them when using keywords, are purely personal choices; SCons functions the same regardless.