3.6. Keyword Arguments
Prev | Chapter 3. Less Simple Things to Do With Builds | Next

## 3.6. Keyword Arguments

SCons also allows you to identify the output file and input source files using Python keyword arguments `target` and `source`. A keyword argument is an argument preceded by an identifier, of the form `name=value`, in a function call. The usage looks like this example:

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

Because the keywords explicitly identify what each argument is, the order does not matter and you can reverse it if you prefer:

    src_files = Split('main.c file1.c file2.c')
    Program(source=src_files, 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.

Prev | Up | Next
3.5. Making Lists of Files Easier to Read | Home | 3.7. Compiling Multiple Programs