Skip to content

Add parentheses to license in repl splash text #104471

@reuven

Description

@reuven

For as long as I can remember, starting the interactive Python shell shows something like this:

Python 3.11.3 (main, Apr  7 2023, 19:25:52) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

This seems super helpful, right? The only issue is that while "copyright" and "credits" are both strings, "help" and "license" are both functions.

If you want help, you need to call help() or help(thing). And if you want to see the license, you need to call it, as in license().

The current text is thus misleading, omitting the parentheses. But we know this, because if I try to invoke them without parentheses, I get the following:

>>> help
Type help() for interactive help, or help(object) for help about object.
>>> license
Type license() to see the full license text

In other words: We tell people to type "help". Then they do that, and we say, "Actually, you need to type help()." Ditto with license.

I think that the help text should more accurately describe what people should type to get help or see the license. As things now stand, we seem to know that people will mistakenly type the words without parentheses, but instead of telling them the right thing, we're redirecting them when they try it.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions