Skip to content

super builtin class #123207

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
dongbohu opened this issue Aug 21, 2024 · 2 comments
Closed

super builtin class #123207

dongbohu opened this issue Aug 21, 2024 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@dongbohu
Copy link

dongbohu commented Aug 21, 2024

Documentation

I found the leading sentence in this paragraph a little misleading:

The :attr:`~class.__mro__` attribute of the *object_or_type* lists the method

because if the object_or_type is an object, it won't have __mro__ attribute. The attribute should be object.__class__.__mro__.

On the other hand, if object_or_type is a type (class), then __mro__ attribute does exist.

Linked PRs

@dongbohu dongbohu added the docs Documentation in the Doc dir label Aug 21, 2024
@eendebakpt
Copy link
Contributor

@dongbohu I agree it is a bit confusing. Maybe we can reformulate to something like

The :attr:~class.__mro__ attribute of the class corresponding to object_or_type lists the method ...

Maybe there are better suggestions, otherwise I will open a PR with this suggestion.

@dongbohu
Copy link
Author

@eendebakpt: I think your proposed wording is much better. Thank you!

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 5, 2024
…er() (pythonGH-123417)

(cherry picked from commit 327463a)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Sep 5, 2024
…er() (pythonGH-123417)

(cherry picked from commit 327463a)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
ambv pushed a commit that referenced this issue Sep 6, 2024
…per() (GH-123417) (#123733)

(cherry picked from commit 327463a)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
ambv pushed a commit that referenced this issue Sep 6, 2024
…per() (GH-123417) (#123732)

(cherry picked from commit 327463a)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
@encukou encukou closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

3 participants