aesophor / aesophor/py-todo

Moving argument handling from if statements to functions

未关闭
#26 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
111
派生
20
PR 合并指标
30 天内没有已合并 PR

描述

If you take a look at my not-yet-PR'd branch [handlerRefactor](https://github.com/Steampunkery/py-todo/tree/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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。