Assignment 9: argparse

Assignment 9: argparse

par D Cocroft,
Nombre de réponses : 1

Hello,

Is the default output from the argparse module for no user input when .add_argument is used enough in terms of defensive coding for ensuring proper user input, or should we try to do something extra?

Thanks

En réponse à D Cocroft

Re: Assignment 9: argparse

par Erik Spence,
For no user input, yes, the default errors are sufficient defensive coding. The number of arguments is not the only thing you need to defend against, of course.