diff --git a/README.md b/README.md index b3c5767..a4c4aa0 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,12 @@ args, kwargs = parse_args(argv=['pargs.py', '--name=Pargs']) # Specification -`parse_args` parses arguments in the following way, assuming the following command line arguments (`sys.argv`): - -`['/pargs/pargs.py', 'command', 'positional', '--flag', '--optional=value', 'test', '--output-file', 'filename', '-flg', 'name', 'name2']` +`parse_args` parses arguments in the following way, assuming the following command line arguments (`sys.argv`): `['/pargs/pargs.py', 'command', 'positional', '--flag', '--optional=value', 'test', '--output-file', 'filename', '-flg', 'name', 'name2']` By calling `args, kwargs = parse_args()`, this would return the following list and dict: ```python -args = ['/pargs/pargs.py', 'command', 'positional'], +args = ['/pargs/pargs.py', 'command', 'positional'] kwargs = { 'flag': True, 'optional': ['value', 'test'], @@ -53,4 +51,4 @@ kwargs = { - All other arguments are considered optional keyword arguments (`kwargs`) - Optional arguments without leading hyphens are considered as values to preceding keyword arguments and saved as list - Flags are recorded with the value `True` in the dict -- The leading up to two hyphens are stripped from options, all other hyphens are converted into underscores (`---test-this-` would become `_test_this_`) +- Up to 2 leading hyphens are stripped from options, all other hyphens are converted into underscores (`---test-this-` would become `_test_this_`)