filmov
tv
Python Fundamentals: Argparse 2 of 2
Показать описание
Quick Reference
Additional Features Covered:
- nargs
- number of arguments
- can be a fixed number or use `+` operator (to gather into a list)
- dest (--sum argument)
- accumulate
- accumulate attribute will be either the sum() function, if --sum was specified at the command line, or the max() function
- action (--sum argument)
- `store` is default
- `store_const`
- type
- require `int`
- metavar
- compare with --help output
- replaces argument name (integers)
- mutually exclusive groups
Additional Features Covered:
- nargs
- number of arguments
- can be a fixed number or use `+` operator (to gather into a list)
- dest (--sum argument)
- accumulate
- accumulate attribute will be either the sum() function, if --sum was specified at the command line, or the max() function
- action (--sum argument)
- `store` is default
- `store_const`
- type
- require `int`
- metavar
- compare with --help output
- replaces argument name (integers)
- mutually exclusive groups