Commit Graph

96 Commits

Author SHA1 Message Date
Sean Robinson
bcc1f5adea Add documentation for Argument.scan
IMHO, the .scan function and its supporting functions are beautiful
metaprogramming that needs to be more visible to argparse users.  As a
start, document the function, with simple examples.

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2021-08-24 09:25:49 -07:00
Sean Robinson
3efd045ea9 Add ArgumentParser.is_used to discern user-supplied values from defaults
.present returns std::nullopt if the optional argument is not given by the
user -- as long as a .default_value is not defined.  With a .default_value,
.present cannot be used to determine if a value is user-provided or the
default.

.is_used fills that role and only returns true if the argument was passed
by the user.

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2021-04-07 14:09:10 -07:00
Sean Robinson
54d3cda804 Add Argument.append method to allow repeated argument use
The default behavior with optional arguments is to allow only a single use
per invocation.  One alternative is to use .nargs, but this requires
previously knowing, and limiting, the quantity of values.  The .append
method removes the restriction on repeats for a single Argument.

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2021-04-07 11:47:09 -07:00
Sean Robinson
a711f26045 Remove trailing spaces from README lines
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2021-04-06 12:07:53 -07:00
Pranav
176da54c9b
Update README.md 2020-05-17 11:09:00 -05:00
Pranav
06649254b3
Update README.md 2020-05-15 19:12:43 -05:00
Pranav Srinivas Kumar
33101e7972 Closes #73 2020-05-08 14:35:05 -05:00
Pranav
45664c4e9f
Update README.md 2020-01-02 20:58:10 -06:00
Pranav
e06890af97
Update README.md 2019-12-01 16:56:19 -06:00
Zhihao Yuan
e6c6c9b31c
Get arguments in optional<T> with .present<T>()
fixes: p-ranav/argparse#66
2019-12-01 02:14:13 -06:00
Zhihao Yuan
ea2f16d264
Upgrade and describe supported toolchains 2019-11-25 17:23:28 -06:00
Pranav
9cac1d0fed
Update README.md 2019-11-22 08:02:44 -06:00
Pranav Srinivas Kumar
da58b28ccb
Update README.md 2019-11-21 10:00:43 -06:00
Pranav Srinivas Kumar
c95835acf8
Update README.md 2019-11-21 08:37:47 -06:00
Pranav Srinivas Kumar
b42c6b7c7e
Update README.md 2019-11-21 08:37:04 -06:00
Pranav Srinivas Kumar
c803c32804
Update README.md 2019-11-21 08:29:34 -06:00
Zhihao Yuan
3f949fc3f1
Stop sharing argument values with parent parsers
See also: p-ranav/argparse#50
2019-11-16 14:33:00 -06:00
Zhihao Yuan
dc74051832
Deprecate print_help()
closes: p-ranav/argparse#40
2019-11-13 02:40:15 -06:00
Pranav Srinivas Kumar
79eba4e81f
Update README.md 2019-09-13 19:47:44 -05:00
Pranav Srinivas Kumar
61e9b644c0
Update README.md 2019-09-10 10:15:15 -05:00
Pranav Srinivas Kumar
db9f81e19a
Update README.md 2019-08-27 10:28:40 -05:00
Pranav Srinivas Kumar
8df0a878ac Merge branch 'master' of github.com:p-ranav/argparse 2019-08-17 16:57:15 -05:00
Pranav Srinivas Kumar
e40d9d5513 Closes #35 2019-08-17 16:57:00 -05:00
Pranav Srinivas Kumar
a2bd798920
Update README.md 2019-06-16 16:36:05 -04:00
Pranav Srinivas Kumar
2c71311b5f
Update README.md 2019-06-09 12:31:58 -04:00
Pranav Srinivas Kumar
6e69548d82
Addresses Issue #25 2019-06-06 21:30:31 -04:00
Pranav Srinivas Kumar
2125f34d35
Update README.md 2019-06-05 15:48:12 -04:00
Pranav Srinivas Kumar
3ff61cce4b
Fixes Issue #23 2019-06-05 15:30:08 -04:00
Pranav Srinivas Kumar
374c70e7b3
Fixes issue #8 2019-05-01 20:13:10 -04:00
Pranav Srinivas Kumar
a80b960ea3
Update README.md 2019-04-28 19:30:52 -04:00
Pranav Srinivas Kumar
f011fd35ff
Update README.md 2019-04-24 14:17:55 -04:00
Pranav Srinivas Kumar
b35cee19e2
Update README.md 2019-04-19 21:09:17 -04:00
Pranav Srinivas Kumar
a60cb8baa2
Update README.md 2019-04-09 15:04:03 -04:00
Pranav Srinivas Kumar
bf3f582740
Update README.md 2019-04-09 14:55:08 -04:00
Pranav Srinivas Kumar
bc4eddc138
Update README.md 2019-04-09 07:46:47 -04:00
Pranav Srinivas Kumar
29f0c52f5f
Update README.md 2019-04-02 07:21:14 -04:00
Pranav Srinivas Kumar
ba8af57470
Update README.md 2019-04-01 23:47:49 -04:00
Pranav Srinivas Kumar
ad016b3c6e
Update README.md 2019-04-01 23:45:25 -04:00
Pranav Srinivas Kumar
c3e4853729
Update README.md 2019-04-01 23:31:27 -04:00
Pranav Srinivas Kumar
9ffa511dac
Update README.md 2019-04-01 23:28:17 -04:00
Pranav Srinivas Kumar
11729b4dfe
Update README.md 2019-04-01 21:53:04 -04:00
Pranav Srinivas Kumar
2bc003018d
Update README.md 2019-04-01 21:43:55 -04:00
Pranav Srinivas Kumar
63309d3e2a
Update README.md 2019-04-01 20:53:04 -04:00
Pranav Srinivas Kumar
b11d357d9a
Update README.md 2019-04-01 20:52:36 -04:00
Pranav Srinivas Kumar
7abad0986d
Update README.md 2019-04-01 20:46:39 -04:00
Pranav Srinivas Kumar
91d0dd8c90
Update README.md 2019-04-01 20:45:49 -04:00
Pranav Srinivas Kumar
a0a2e76d22
Update README.md 2019-04-01 20:09:19 -04:00
Pranav Srinivas Kumar
c47f842c19
Update README.md 2019-04-01 19:59:57 -04:00
Pranav Srinivas Kumar
347881f5b3
Update README.md 2019-04-01 19:58:41 -04:00
Pranav Srinivas Kumar
1d85a98c42
Update README.md 2019-04-01 19:57:22 -04:00