Braces example for multiline conditionals by warsaw · Pull Request #284 · python/peps (original) (raw)

Actually I think the brace should be moved only if the indentation of continuation lines matches the indentation of the following code. In the following case the brace should be kept at the end of the line:

        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                             "invalid escape sequence '\\%c'",
                             *first_invalid_escape) < 0) {
            Py_DECREF(result);
            return NULL;
        }