argparse icon indicating copy to clipboard operation
argparse copied to clipboard

raise_on_error doesn't work as expected.

Open asaff1 opened this issue 7 months ago • 1 comments

Hello, First, this is a nice library! very clean API.

Some suggestions for improvement:

  1. I would expect raise_on_error to throw when unrecognized argument is provided. (Similar to how python argparse behaves) Instead the library simply prints a message "unrecognized argument" and moves on. Also no flag is returned that the user can act a upon (maybe a subclass hook). This may lead to typos that the user won't notice.

  2. Can be nice if the library can accept both --my-value and --my_value (also done by Python argparse)

asaff1 avatar Jul 10 '24 07:07 asaff1