Is vars() the most useless Python built-in ever?

Manolo Martínez manolo at austrohungaro.com
Wed Dec 2 04:40:33 EST 2015


On 12/02/15 at 08:33pm, Chris Angelico wrote:
> On Wed, Dec 2, 2015 at 8:09 PM, Manolo Martínez
> > 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 :)
> 
> I would recommend not using argparse directly. Pick up a wrapper like
> clize, and then define everything through docstrings.
> 
> Clize usage example:
> https://github.com/Rosuav/LetMeKnow/blob/master/letmeknow.py
> 
> https://pypi.python.org/pypi/clize

I try to do as much as I can with standard library tools. As a user, I
find it somewhat off-putting when a tiny project asks you to install any
number of seemingly unrelated libraries. But clize does look like a good
idea, thanks for the pointer.

Manolo



More information about the Python-list mailing list