You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if argparse supports dynamic-length vector as arguments. Something like
./app --try-values 3.312 7.53 -71.2 ...
where the number of values is unknown at compile-time (i.e. without .nargs(#)).
I've been looking at the readme and other issues here, but all I can find is support for repeated arguments. If I understand correctly, this should work:
I wonder if argparse supports dynamic-length vector as arguments. Something like
./app --try-values 3.312 7.53 -71.2 ...
where the number of values is unknown at compile-time (i.e. without
.nargs(#)
).I've been looking at the readme and other issues here, but all I can find is support for repeated arguments. If I understand correctly, this should work:
./app --try-values 3.312 --try-values 7.53 --try-values -71.2 ...
but this can quickly become tedious.
Is there a way to achieve version 1? It would be nice to do this with
.nargs(-1)
or.nargs(0)
or an enum overload like.nargs(narg::dynamic)
.The text was updated successfully, but these errors were encountered: