Skip to content

Commit

Permalink
Braces example for multiline conditionals (python#284)
Browse files Browse the repository at this point in the history
* Braces example for multiline conditionals.

Closes python#283
  • Loading branch information
warsaw authored Jun 10, 2017
1 parent 22e36e2 commit 3800904
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pep-0007.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PEP: 7
Title: Style Guide for C Code
Version: $Revision$
Last-Modified: $Date$
Author: Guido van Rossum <guido@python.org>
Author: Guido van Rossum <guido@python.org>, Barry Warsaw <barry@python.org>
Status: Active
Type: Process
Content-Type: text/x-rst
Expand Down Expand Up @@ -124,11 +124,13 @@ Code lay-out
type->tp_name);

* When you break a long expression at a binary operator, the
operator goes at the end of the previous line, e.g.::
operator goes at the end of the previous line, and braces should be
formatted as shown. E.g.::

if (type->tp_dictoffset != 0 && base->tp_dictoffset == 0 &&
type->tp_dictoffset == b_size &&
(size_t)t_size == b_size + sizeof(PyObject *)) {
(size_t)t_size == b_size + sizeof(PyObject *))
{
return 0; /* "Forgive" adding a __dict__ only */
}

Expand Down

0 comments on commit 3800904

Please sign in to comment.