Skip to content

Require two blank lines *after* a def/class too #400

Description

@gvanrossum

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions