Skip to content

Commit 32f63f5

Browse files
committed
gh-159072: Correct Ctrl+C documentation for msvcrt.getch()
1 parent 7d5dce9 commit 32f63f5

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

‎Doc/library/msvcrt.rst‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ Console I/O
114114
is not already available, but will not wait for :kbd:`Enter` to be
115115
pressed. If the pressed key was a special function key, this will
116116
return ``'\000'`` or ``'\xe0'``; the next call will return the keycode.
117-
The :kbd:`Control-C` keypress cannot be read with this function.
118117

119118

120119
.. function:: getwch()

‎PC/clinic/msvcrtmodule.c.h‎

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎PC/msvcrtmodule.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,12 @@ Read a keypress and return the resulting character as a byte string.
227227
Nothing is echoed to the console. This call will block if a keypress is
228228
not already available, but will not wait for Enter to be pressed. If the
229229
pressed key was a special function key, this will return '\000' or
230-
'\xe0'; the next call will return the keycode. The Control-C keypress
231-
cannot be read with this function.
230+
'\xe0'; the next call will return the keycode.
232231
[clinic start generated code]*/
233232

234233
static int
235234
msvcrt_getch_impl(PyObject *module)
236-
/*[clinic end generated code: output=a4e51f0565064a7d input=37a40cf0ed0d1153]*/
235+
/*[clinic end generated code: output=a4e51f0565064a7d input=967463215ff3ab9d]*/
237236
{
238237
int ch;
239238

0 commit comments

Comments
 (0)