Skip to content

Commit 1c3683e

Browse files
Update Python/bltinmodule.c to use PEP-7
Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 2f01196 commit 1c3683e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Python/bltinmodule.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2587,7 +2587,10 @@ builtin_input_impl(PyObject *module, PyObject *prompt)
25872587
}
25882588
else {
25892589
if (s[len-1] == '\n')
2590-
len--; /* strip trailing '\n' */
2590+
/* strip trailing '\n' */
2591+
if (s[len-1] == '\n') {
2592+
len--;
2593+
}
25912594
if (len != 0 && s[len-1] == '\r')
25922595
len--; /* strip trailing '\r' */
25932596
result = PyUnicode_Decode(s, len, stdin_encoding_str,

0 commit comments

Comments
 (0)