10000 bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile by ambv · Pull Request #29094 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile #29094

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 4 commits into from
Oct 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor grammar fix
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
  • Loading branch information
ambv and pablogsal authored Oct 20, 2021
commit c5df6bbb4e4b4c06f66763d524b8ea73740a4f0f
2 changes: 1 addition & 1 deletion Doc/library/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ attribute, as well as due to possible memory layout incompatibilities.
Most built-in exceptions are implemented in C for efficiency, see:
:source:`Objects/exceptions.c`. Some have custom memory layouts
which makes it impossible to create a subclass that inherits from
multiple exception types. Memory layout of a type is an implementation
multiple exception types. The memory layout of a type is an implementation
detail and might change between Python versions, leading to new
conflicts in the future. Therefore, it's recommended to avoid
subclassing multiple exception types altogether.
Expand Down
0