Write more beautiful python code

Contributing to more Python projects like Launchpad has also taught me about writing PEP8 compliant code. One is expected to run make lint and fix lint errors.

Running pep8. Not real code though. I'm not /that/ bad :P

A major part of the code I write at my day job consist of scripts, which I most often prefer to write in Python (second only to bash). I hate to admit it, but my code is rarely pretty. I just write hacky scripts. I now use pep8 and pyflakes on all the python code that I write. It does look nicer, although occasionally painful to fix 😉 Almost all the time pyflakes help me catch an error in the script even before I run the script.






Leave a Reply