News for hackers. Stuff that matters.

Python Code Review

Looking for code review for my first (short) python application at https://github.com/yousifS/spm.
( 2 comments | on HN )
Re:Python Code Review by dilithiumhe3 on Friday March 15, 2013 @03:11PM (#5382360)
Might want to add some code comments so that it's easy to tell the intention of each method. Personal experience: when you write a little bit of a pydoc for your code it can highlight code smells. e.g.: If the docstring is too long then maybe you are doing too much in one method.
Re:Python Code Review by numberwhun on Friday March 15, 2013 @03:53PM (#5382609)
Looking at the run function, you might benefit to use a switch-case in place of that plethora of if-elif's. It would look a bit neater IMHO.