Skip to content
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

Correct description of inheriting from another class #114660

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

smontanaro
Copy link
Contributor

@smontanaro smontanaro commented Jan 27, 2024

"inherits " grates this reader. I think it should be "inherits from ".


📚 Documentation preview 📚: https://cpython-previews--114660.org.readthedocs.build/

"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Jan 27, 2024
@terryjreedy terryjreedy added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Feb 1, 2024
@terryjreedy
Copy link
Member

Other instances in Doc/library

gzip.rst: 64:    An exception raised for invalid gzip files.  It inherits :exc:`OSError`.
pickle.rst: 275:    Common base class for the other pickling exceptions.  It inherits
pickle.rst: 281:    It inherits :exc:`PickleError`.
pickle.rst: 289:    corruption or a security violation.  It inherits :exc:`PickleError`.
symtable.rst: 100:    A namespace for a function or method.  This class inherits
symtable.rst: 126:    A namespace of a class.  This class inherits :class:`SymbolTable`.

There are 32 other instances of 'inherits', nearly all with 'inherits from'. I agree that the latter is more correct. I am asking about this on the coredev discord.

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.

Agree. Maybe also fix the other instances Terry found in this PR.

@smontanaro
Copy link
Contributor Author

I just amended the PR with the changes I found, which are (I believe) the same ones Terry identified.

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.

Thanks, I noticed two more instances.

Doc/library/symtable.rst Show resolved Hide resolved
Doc/library/pickle.rst Show resolved Hide resolved
@JelleZijlstra JelleZijlstra merged commit c9c6e04 into python:main Feb 1, 2024
23 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 1, 2024
"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
(cherry picked from commit c9c6e04)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Feb 1, 2024

GH-114868 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 1, 2024
"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
(cherry picked from commit c9c6e04)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Feb 1, 2024
@bedevere-app
Copy link

bedevere-app bot commented Feb 1, 2024

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

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Feb 1, 2024
@JelleZijlstra
Copy link
Member

Thanks Skip!

JelleZijlstra pushed a commit that referenced this pull request Feb 1, 2024
… (#114868)

"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
(cherry picked from commit c9c6e04)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
JelleZijlstra pushed a commit that referenced this pull request Feb 1, 2024
… (#114869)

"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
(cherry picked from commit c9c6e04)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
@smontanaro smontanaro deleted the patch-4 branch February 6, 2024 16:17
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
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 skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants