Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving argument handling from if statements to functions #26

Open
Steampunkery opened this issue Nov 9, 2018 · 0 comments
Open

Moving argument handling from if statements to functions #26

Steampunkery opened this issue Nov 9, 2018 · 0 comments

Comments

@Steampunkery
Copy link
Contributor

If you take a look at my not-yet-PR'd branch handlerRefactor, you'll see the general idea for what I'm thinking. The long if statement we have now is not very pretty or easy to read. I think it would be a good idea to move all that functionality from the if statements into functions. As you can see from my branch, each function is then registered into a dictionary. They key in the dict is a tuple of command line arguments that trigger the given function, which is stored as the value in the dict.

It might even be a good idea to put the handler functions in another file in the future. I did some research and it's possible to bundle multiple python files into a single executable zip file, so you won't need to install multiple files, just zip them all together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant