Skip to content

gh-103886: Improve builtins.__doc__ #104179

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

Merged
merged 6 commits into from
May 7, 2023
Merged

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented May 4, 2023

I basically took the explanation from the docs since the module's already explained very well there.

I thought it wasn't necessary to point out Ellipsis specifically while not mentioning any other objects (and you can always use ... instead of Ellipsis anyway..)

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, thanks! I'll ask for some more feedback from others.

Co-authored-by: Jelle Zijlstra <[email protected]>
@ghost
Copy link

ghost commented May 5, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@erlend-aasland
Copy link
Contributor

@tomasr8: note that we do not use force-push in our workflow. Force-pushing does not play well with the GitHub UI, and it can be frustrating for the reviewer. So, for the reviewers convenience, please use git merge --no-ff main in the future :)

@erlend-aasland
Copy link
Contributor

@tomasr8
Copy link
Member Author

tomasr8 commented May 5, 2023

I accidentally committed with the wrong email 😄 (not under CLA) so force pushing was necessary to fix that.. sorry about that

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

On current main:

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

NAME
    builtins - Built-in functions, exceptions, and other objects.

DESCRIPTION
    Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.

(etc. for many lines)

With this PR (after rebuilding Python):

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

NAME
    builtins - Built-in functions, types, exceptions, and other objects.

DESCRIPTION
    This module provides direct access to all 'built-in'
    identifiers of Python; for example, builtins.open is
    the full name for the built-in function open().

    This module is not normally accessed explicitly by most
    applications, but can be useful in modules that provide
    objects with the same name as a built-in value, but in
    which the built-in of that name is also needed.

The new version is far more helpful.

@erlend-aasland erlend-aasland added the needs backport to 3.11 only security fixes label May 5, 2023
@erlend-aasland
Copy link
Contributor

BTW, we don't need a NEWS entry for this. Can you please remove it?

tomasr8 and others added 2 commits May 5, 2023 19:02
@JelleZijlstra JelleZijlstra merged commit b35711d into python:main May 7, 2023
@miss-islington
Copy link
Contributor

Thanks @tomasr8 for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-104257 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 7, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 7, 2023
(cherry picked from commit b35711d)

Co-authored-by: Tomas R <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>
JelleZijlstra added a commit that referenced this pull request May 7, 2023
gh-103886: Improve `builtins.__doc__` (GH-104179)
(cherry picked from commit b35711d)

Co-authored-by: Tomas R <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>
@tomasr8 tomasr8 deleted the builtins-doc branch May 7, 2023 07:34
jbower-fb pushed a commit to jbower-fb/cpython that referenced this pull request May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants