[Python-checkins] peps: Update PEP 7 to strongly encourage curly braces with conditional

brett.cannon python-checkins at python.org
Wed Jan 20 22:19:44 EST 2016


https://hg.python.org/peps/rev/6fd405679546
changeset:   6200:6fd405679546
user:        Brett Cannon <brett at python.org>
date:        Wed Jan 20 19:19:42 2016 -0800
summary:
  Update PEP 7 to strongly encourage curly braces with conditional
statements.

files:
  pep-0007.txt |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/pep-0007.txt b/pep-0007.txt
--- a/pep-0007.txt
+++ b/pep-0007.txt
@@ -75,9 +75,9 @@
       }
 
 * Code structure: one space between keywords like ``if``, ``for`` and
-  the following left paren; no spaces inside the paren; braces may be
-  omitted where C permits but when present, they should be formatted
-  as shown::
+  the following left paren; no spaces inside the paren; braces are
+  strongly preferred but may be omitted where C permits, and they
+  should be formatted as shown::
 
       if (mro != NULL) {
           ...

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list