PEP 8

diff
1.comparison to None should be if cond is not None:
2.at least two spaces before inline comment
3.continuation line under-indented for visual indent