The pep8 tool insist on two blank lines before a top-level class or def, but not after one. So you get the following asymmetry:
import stuff
def main():
blah, blah
if __name__ == '__main__':
main()
The intention of PEP 8 is to require two blank lines before the 'if' too. I realize the PEP isn't fully clear, since it only says "separate [...] with two blank lines", and if you want an authoritative rule I can rewrite it. Just let me know!