[3.10] gh-100776: Fix misleading default value in help(input) (GH-100788) (#100842)

(cherry picked from commit a2141882f2)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
Shantanu 2023-01-08 01:23:34 -08:00 committed by GitHub
parent fa8d396e10
commit a8702bb8c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -0,0 +1 @@
Fix misleading default value in :func:`input`'s ``__text_signature__``.

View file

@ -2034,7 +2034,7 @@ flush: whether to forcibly flush the stream.");
/*[clinic input]
input as builtin_input
prompt: object(c_default="NULL") = None
prompt: object(c_default="NULL") = ""
/
Read a string from standard input. The trailing newline is stripped.
@ -2048,7 +2048,7 @@ On *nix systems, readline is used if available.
static PyObject *
builtin_input_impl(PyObject *module, PyObject *prompt)
/*[clinic end generated code: output=83db5a191e7a0d60 input=5e8bb70c2908fe3c]*/
/*[clinic end generated code: output=83db5a191e7a0d60 input=159c46d4ae40977e]*/
{
PyObject *fin = _PySys_GetObjectId(&PyId_stdin);
PyObject *fout = _PySys_GetObjectId(&PyId_stdout);

View file

@ -672,7 +672,7 @@ exit:
}
PyDoc_STRVAR(builtin_input__doc__,
"input($module, prompt=None, /)\n"
"input($module, prompt=\'\', /)\n"
"--\n"
"\n"
"Read a string from standard input. The trailing newline is stripped.\n"
@ -874,4 +874,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
/*[clinic end generated code: output=da9ae459e9233259 input=a9049054013a1b77]*/
/*[clinic end generated code: output=b5c1a7a1621b7cca input=a9049054013a1b77]*/