aboutsummaryrefslogtreecommitdiffstats
path: root/info
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--info/argparser.texinfo38
1 files changed, 19 insertions, 19 deletions
diff --git a/info/argparser.texinfo b/info/argparser.texinfo
index 355e3e4..311b7eb 100644
--- a/info/argparser.texinfo
+++ b/info/argparser.texinfo
@@ -124,9 +124,9 @@ of the option and may span multiple lines but should only do so if the
lines below the first is just extra details.
When you have populated your @code{ArgParser} with options, it is time
-to parse arguments, it is done with the method @code{parse} that optional
-takes and list of arguments. If you choose to use a list of arguments
-rather than letting @code{ArgParser} use arguments used to start the
+to parse arguments; this is done with the method @code{parse} that optionally
+takes a list of arguments. If you choose to use a list of arguments
+rather than letting @code{ArgParser} use the arguments used to start the
program, the first element will not be parsed as it is assumed to be the
executable. If you want long options with just one dash or plus, which
disables short options, you can pass @code{True}, as the second (option)
@@ -136,35 +136,35 @@ If you now want to use any option alternative rather than just the
primary (using just the primary is good to keep your code consistent)
invoke the nulladic method @code{support_alternatives}.
-Before using your options you should so some checks that the combination
-of options and arguments are valid. There are some methods provided to do
-this. @code{test_exclusiveness} checks that no confliction options are
-used, as the first argument, a set of options provided from which at most
-one may be used; as a optional second argument, a return code can be provided
+Before using your options you should do some checks to ensure that the combination
+of options and arguments is valid. There are some methods provided to do
+this. @code{test_exclusiveness} checks that no conflicting options are
+used; as the first argument, a set of options is provided from which at most
+one may be used. As an optional second argument, a return code can be provided
if you want the program to exit if there are option conflicts.
-@code{test_allowed} checks that only allowed options are used, as the first
-argument, a set of options provided in which all used arguments must exist;
-as a optional second argument, a return code can be provided if you want the
-program to exit if there are out of context option.
+@code{test_allowed} checks that only allowed options are used; as the first
+argument, a set of options is provided in which all used arguments must exist.
+As an optional second argument, a return code can be provided if you want the
+program to exit if there are out of context options.
@code{test_files} checks that the number of arguments not associated with
-an option is within an acccepted range, it takes three option arguments,
+an option is within an accepted range; it takes three optional arguments,
@code{min}, @code{max} and @code{exit_value}. @code{min} is the minimum count,
@code{max} is the maximum count, @code{None} if unlimited, and @code{exit_value}
-is a return code can be provided if you want the program to exit if there
-are out of context option. Remember that you should also check that the
+is a return code that can be provided if you want the program to exit if there
+are out of context options. Remember that you should also check that the
number of times an option is used is acceptable.
After running @code{parse}, your @code{ArgParser} has five attributes:
@code{unrecognisedCount}, the number of unrecognised options; and
-@code{message}, the join of @code{files} which is all arguments not
+@code{message}, the concatenation of @code{files}, which is all arguments not
associated with an option, @code{arguments} the parsed arguments, and
@code{argcount}, the number of arguments in @code{arguments}.
-All valid options are stored in your @code{ArgParser}'s @code{opts},
+All valid options are stored in your @code{ArgParser}'s @code{opts};
it is a dictionary from the option to either @code{None} if the option
has not been used, or a list of all used values, in order. A variadic
-option without any argumnt will have a empty list and a argumentless
-option will have list filled with @code{None}.
+option without any argument will have an empty list and an argumentless
+option will have a list filled with @code{None}.
To print a help page based on the constructor arguments and populated
options invoke the nulladic method @code{help}.