June 2017
Beginner to intermediate
274 pages
6h 49m
English
If we set nargs to a number, that many words will be collected for the argument. We can also set nargs to * to mean any number of words or + to mean at least one word. There are a few other values we could set nargs to, but we won't talk about them here in this section.
Let's look back at our Pipeline program. I think we want it to understand two arguments-an optional argument that tells it to keep going, even if one of the programs returns an error code, and a filename, where it should load and store a pipeline configuration:

After the call to parse parse_args, we have an object named args that contains a keep_going attribute set to ...
Read now
Unlock full access