[Python-Dev] PEP 7 and braces { .... } on if (original) (raw)

Skip Montanaro skip.montanaro at gmail.com
Mon Jun 5 08:00:18 EDT 2017


On Mon, Jun 5, 2017 at 12:41 AM, Serhiy Storchaka <storchaka at gmail.com> wrote:

Barry and Victor prefer moving a brace on a new line in all multiline conditional cases. I think that it should be done only when the condition continuation lines and the following block of the code have the same indentation (as in the example above), and the following code is enough readable:

if (PyErrWarnFormat(PyExcDeprecationWarning, 1, "invalid escape sequence '\%c'", *firstinvalidescape) < 0) { PyDECREF(result); return NULL; } What other core developers think about this?

Wow, this discussion takes me back. Glad I don't have to check out comp.lang.c to get my brace placement fix.

Skip



More information about the Python-Dev mailing list