mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Update README.md
This commit is contained in:
parent
030676c2f1
commit
ad4bb635a7
@ -157,10 +157,9 @@ Here's what's happening:
|
||||
* We have three optional arguments ```-a```, ```-b``` and ```-c```.
|
||||
* ```-a``` and ```-b``` are toggle arguments.
|
||||
* ```-c``` requires 2 floating point numbers from the command-line. You can specify how many inputs to expect using ```nargs```.
|
||||
* argparse can handle compound arguments ```-abc``` and ```-bac```. This only works with short single-character argument names.
|
||||
* argparse can handle compound arguments, e.g., ```-abc``` or ```-bac``` or ```-cab```. This only works with short single-character argument names.
|
||||
- ```-a``` and ```-b``` become true.
|
||||
- argv is further parsed to identify the inputs mapped to ```-c```.
|
||||
* Using ```-cab``` will throw an error since argparse expects two inputs for the argument ```-c```.
|
||||
|
||||
## Further Examples
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user