Skip to content

bpo-45464: Add a warning about subclassing built-in exceptions #28995

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
wants to merge 1 commit into from

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Oct 16, 2021

https://bugs.python.org/issue45464

Automerge-Triggered-By: GH:pablogsal

@@ -66,6 +66,8 @@ In either case, the exception itself is always shown after any chained
exceptions so that the final line of the traceback always shows the last
exception that was raised.

.. warning:: Creating a subclass that inherits from multiple exceptions may not
Copy link
Contributor

@ambv ambv Oct 19, 2021

Choose a reason for hiding this comment

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

We generally avoid warning boxes on docs.python.org, instead opting for a more affirmative documentation style. See here: https://devguide.python.org/documenting/#affirmative-tone

Copy link
Member Author

Choose a reason for hiding this comment

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

I still prefer the warning because I think this should have more visibility and he have done this in the past for exactly this reason. In any case, I am happy to take a suggestion on how to make this more affirmative while keeping it visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants