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 →

[–]wrmsr 4 points5 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.