Skip to content

[pep8] Document empty blocks - #671

Closed
ambv wants to merge 1 commit into
masterfrom
empty-blocks
Closed

ambv wants to merge 1 commit into
masterfrom
empty-blocks

Conversation

@ambv

@ambv ambv commented Jun 13, 2018

Copy link
Copy Markdown
Contributor

Comment thread pep-0008.txt
``pass``.

Do not use ``...`` or ``None`` for this purpose. The former suggests
"details supressed" instead of "there is nothing there". The latter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: suppressed

Comment thread pep-0008.txt
Empty blocks
------------

Use ``pass`` to denote a block is intentionally empty. In empty

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...block which is intentionally left empty.

@gvanrossum

Copy link
Copy Markdown
Member

I still don't think this needs to make it into PEP 8 -- I don't think I've ever seen a debate about this or code doing it wrong until Łukasz brought it up on Twitter. We should exercise restraint when adding to PEP 8 -- it's already getting long, and there are more important things that it's not even mentioning.

@gvanrossum gvanrossum closed this Jun 13, 2018
@ambv
ambv deleted the empty-blocks branch June 14, 2018 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants