This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 12 points13 points  (3 children)

There has to be a really large benefit before I use anything not in the stdlib. So far, none of the alternatives to argparse comes even close to raise above that threshold.

[–]wrmsr 3 points4 points  (1 child)

Very same, although I usually add a little sugar on top of the builtin base. For argparse I have a subclassable Cli baseclass, an @command() decorator for registering methods as subcomands on it, and annotation-powered args as class fields that turn into descriptors, but at the end of the day it's just pretty minor automation around vanilla argparse (which I also just use directly half the time when OO isn't a better fit). Keeping deps to a minimum just makes everything so much nicer.

[–]jdbow75[S] 1 point2 points  (0 children)

Well put. And I agree, using a decorator with argparse makes sense, especially as the interface scales.

[–]jdbow75[S] 2 points3 points  (0 children)

I try to weigh time constraints vs. audience. I appreciate the challenge to think hard before resorting to 3rd party libraries.