Conversation
|
I don’t know if you’re looking for comments or not, but I’ll offer some feedback anyway in the hope that it’s useful. In short, if your goal is to separate your main entry point logic from the argument parsing logic, I think a separate |
|
Thanks. My thinking was to create a nice framework for defining subcommands, because I don't much like the way argparse does it. But when I actually implemented it, I didn't like the way it spread argument parsing stuff into different modules. So this PR isn't going anywhere in its current state, but it's lingering as a kind of placeholder in case I get another idea about subcommand handling. |
I'm not convinced that this is actually an improvement - it looked better in my imagination - but having done it I thought I'd open a PR to consider it.
In master, all the command line parsing code is in one place, and it dispatches to individual bits of functionality in other modules. This PR puts the command line parsing for each subcommand into the module with the code it calls.
Pros:
Cons:
argparseobjects.