Is vars() the most useless Python built-in ever?
Manolo Martínez
manolo at austrohungaro.com
Wed Dec 2 04:09:54 EST 2015
Dear Peter, and Steven, thanks again for engaging with my script. I'm
fully aware that this is not the tutor mailing list :)
Peter Otten wrote:
> As far as I can see in a correctly written script the AttributeError cannot
> be triggered by the user as argparse handles this case automatically by
> showing the help.
This... is true. I could have sworn that's not the way argparse behaved
when I wrote that snippet, but I've been very wrong before about similar
things. Anyway my main() function looks much better now :)
> By the way, I recommend coverage.py to find dead code. I have not used
> it for too long, and I regret it ;)
I blush to confess I would first need to write a test suite. But yeah,
will do both, thanks for the recommendation.
Cheers,
Manolo
More information about the Python-list
mailing list