Braces example for multiline conditionals (#284)
* Braces example for multiline conditionals. Closes #283
This commit is contained in:
parent
22e36e2113
commit
3800904843
|
@ -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
|
||||
|
@ -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 */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue