Bug report
Bug description:
When reading from the tty python's builtin input function assumes that the last character read is a newline and proceed to strip it out leading to missing input.
Current behaviour:
$ ./python -c 'print(repr(input()))'
abc'ab'
Expected behaviour:
$ ./python -c 'print(repr(input()))'
abc'abc'
CPython versions tested on:
3.14, 3.13, CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
When reading from the tty python's builtin
inputfunction assumes that the last character read is a newline and proceed to strip it out leading to missing input.Current behaviour:
Expected behaviour:
CPython versions tested on:
3.14, 3.13, CPython main branch
Operating systems tested on:
Linux
Linked PRs
inputassuming the last character being a '\n' #149237