mirror of
https://github.com/python/cpython.git
synced 2025-11-11 14:44:57 +00:00
gh-102921: [doc] Clarify exc argument name in BaseExceptionGroup is plural (#102922)
This commit is contained in:
parent
3468c768ce
commit
9b19d3936d
1 changed files with 2 additions and 2 deletions
|
|
@ -948,8 +948,8 @@ their subgroups based on the types of the contained exceptions.
|
||||||
these fields do not need to be updated by :meth:`derive`. ::
|
these fields do not need to be updated by :meth:`derive`. ::
|
||||||
|
|
||||||
>>> class MyGroup(ExceptionGroup):
|
>>> class MyGroup(ExceptionGroup):
|
||||||
... def derive(self, exc):
|
... def derive(self, excs):
|
||||||
... return MyGroup(self.message, exc)
|
... return MyGroup(self.message, excs)
|
||||||
...
|
...
|
||||||
>>> e = MyGroup("eg", [ValueError(1), TypeError(2)])
|
>>> e = MyGroup("eg", [ValueError(1), TypeError(2)])
|
||||||
>>> e.add_note("a note")
|
>>> e.add_note("a note")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue