[Python-ideas] pep 7 line break suggestion differs from pep 8

Joseph Jevnik joejev at gmail.com
Mon Apr 18 15:33:22 EDT 2016


I saw that there was recently a change to pep 8 to suggest adding a line
break before a binary operator. Pep 7 suggests the opposite:

> When you break a long expression at a binary operator, the operator goes
at the end of the previous line, e.g.:

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

I imagine that some of the reasons for making the change in pep 8 for
readability reasons will also
translate to C; maybe pep 7 should also be updated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160418/4f5e36ba/attachment.html>


More information about the Python-ideas mailing list