diff --git a/pep-0008.txt b/pep-0008.txt index 9b7fa0688bb..0ee014d1bb2 100644 --- a/pep-0008.txt +++ b/pep-0008.txt @@ -310,6 +310,18 @@ Note, some editors and web-based code viewers may not recognize control-L as a form feed and will show another glyph in its place. +Empty blocks +------------ + +Use ``pass`` to denote a block is intentionally empty. In empty +class or function bodies, prefer a meaningful docstring instead of +``pass``. + +Do not use ``...`` or ``None`` for this purpose. The former suggests +"details supressed" instead of "there is nothing there". The latter +looks like an unfinished thought. + + Source File Encoding -------------------- @@ -642,6 +654,7 @@ Other Recommendations if foo == 'blah': one(); two(); three() + When to Use Trailing Commas ===========================