Skip to content

Commit be7c197

Browse files
authored
[3.11] gh-100776: Fix misleading default value in help(input) (GH-100788) (#100841)
(cherry picked from commit a214188) Co-authored-by: Shantanu <[email protected]>
1 parent 87076d8 commit be7c197

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix misleading default value in :func:`input`'s ``__text_signature__``.

Python/bltinmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,7 +2065,7 @@ builtin_print_impl(PyObject *module, PyObject *args, PyObject *sep,
20652065
/*[clinic input]
20662066
input as builtin_input
20672067
2068-
prompt: object(c_default="NULL") = None
2068+
prompt: object(c_default="NULL") = ""
20692069
/
20702070
20712071
Read a string from standard input. The trailing newline is stripped.
@@ -2079,7 +2079,7 @@ On *nix systems, readline is used if available.
20792079

20802080
static PyObject *
20812081
builtin_input_impl(PyObject *module, PyObject *prompt)
2082-
/*[clinic end generated code: output=83db5a191e7a0d60 input=5e8bb70c2908fe3c]*/
2082+
/*[clinic end generated code: output=83db5a191e7a0d60 input=159c46d4ae40977e]*/
20832083
{
20842084
PyThreadState *tstate = _PyThreadState_GET();
20852085
PyObject *fin = _PySys_GetAttr(

Python/clinic/bltinmodule.c.h

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

0 commit comments

Comments
 (0)