summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2023-01-06-02-02-11.gh-issue-100776.pP8xux.rst1
-rw-r--r--Python/bltinmodule.c4
-rw-r--r--Python/clinic/bltinmodule.c.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-01-06-02-02-11.gh-issue-100776.pP8xux.rst b/Misc/NEWS.d/next/Core and Builtins/2023-01-06-02-02-11.gh-issue-100776.pP8xux.rst
new file mode 100644
index 0000000..b94121e
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2023-01-06-02-02-11.gh-issue-100776.pP8xux.rst
@@ -0,0 +1 @@
+Fix misleading default value in :func:`input`'s ``__text_signature__``.
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 9ebe4c8..599cc18 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -2063,7 +2063,7 @@ builtin_print_impl(PyObject *module, PyObject *args, PyObject *sep,
/*[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.
@@ -2077,7 +2077,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]*/
{
PyThreadState *tstate = _PyThreadState_GET();
PyObject *fin = _PySys_GetAttr(
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h
index baf9555..b77b4a1 100644
--- a/Python/clinic/bltinmodule.c.h
+++ b/Python/clinic/bltinmodule.c.h
@@ -1126,7 +1126,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"
@@ -1409,4 +1409,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=0a6a8efe82cf8b81 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=84a04e7446debf58 input=a9049054013a1b77]*/