Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Jan 24, 2022

…ssage and exceptions attributes.

https://bugs.python.org/issue46431

Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

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

Thanks! This is much clearer.
Nitpick: since there's no output, could you remove the REPL prompts?

iritkatriel and others added 2 commits January 24, 2022 15:18
Co-authored-by: Petr Viktorin <encukou@gmail.com>
>>> MyGroup("eg", [ValueError(1), TypeError(2)]).split(TypeError)
(MyGroup('eg', [TypeError(2)]), MyGroup('eg', [ValueError(1)]))

Note that :exc:`BaseExceptionGroup` defines :meth:`__new__`, so
Copy link
Member

Choose a reason for hiding this comment

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

This block is in the docs for the derive method, but I think it makes more sense in the top-level description of the class (here: https://docs.python.org/3.11/library/exceptions.html#BaseExceptionGroup).

Also, I noticed the descriptions of the methods are underindented in the docs. They should be indented by one more level, as you did for the attributes above.

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 agree this belong at a higher level. On the other hand I didn't want to present it in the beginning before we even mentioned derive(). Would it work if I indent everything as you suggest, and leave the full subclassing example at its current indentation level?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, good idea

@iritkatriel iritkatriel merged commit b18fd54 into python:main Jan 24, 2022
@iritkatriel iritkatriel deleted the bpo-46431-subclassing-ExceptionGroup branch January 24, 2022 21:50
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 news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants