I don't think PEP8 requires blanks for opening and closing brackets. Also please move the comment to a line comment. Those inline comments exceed the line length and are hard to spot and read.