de-lint
Slightly more pythonic version of pull request #7 - thanks umitkablan