Skip to content

Incorrect documentation for input parameter #100776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SimpleArt opened this issue Jan 5, 2023 · 0 comments
Closed

Incorrect documentation for input parameter #100776

SimpleArt opened this issue Jan 5, 2023 · 0 comments

Comments

@SimpleArt
Copy link

SimpleArt commented Jan 5, 2023

The documentation for input when using help(...) shows this:

>>> help(input)
Help on built-in function input in module builtins:

input(prompt=None, /)
    Read a string from standard input.  The trailing newline is stripped.

    The prompt string, if given, is printed to standard output without a
    trailing newline before reading input.

    If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
    On *nix systems, readline is used if available.

This implies input() does the same as input(None), but using input(None) actually does input("None"). It should probably be changed to show input(prompt="", /) as the default argument instead.

Linked PRs

hauntsaninja added a commit to hauntsaninja/cpython that referenced this issue Jan 6, 2023
hauntsaninja added a commit to hauntsaninja/cpython that referenced this issue Jan 8, 2023
…ythonGH-100788).

(cherry picked from commit a214188)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
hauntsaninja added a commit to hauntsaninja/cpython that referenced this issue Jan 8, 2023
…ythonGH-100788).

(cherry picked from commit a214188)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
hauntsaninja added a commit that referenced this issue Jan 8, 2023
) (#100841)

(cherry picked from commit a214188)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
hauntsaninja added a commit that referenced this issue Jan 8, 2023
) (#100842)

(cherry picked from commit a214188)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants