Assignment 9: argparse

Assignment 9: argparse

by D Cocroft -
Number of replies: 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

In reply to D Cocroft

Re: Assignment 9: argparse

by 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.