Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.

Commit 2658ee0

Browse files
author
Robert Schindler
committed
Small adjustments
1 parent f33eeee commit 2658ee0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exceptiongroup/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def add(self, exception, source=""):
9494
"""
9595
new = type(self)(
9696
self.message,
97-
self.exceptions + [exception],
98-
self.sources + [source],
97+
[*self.exceptions, exception],
98+
[*self.sources, source],
9999
)
100100
self._copy_magic_attrs(new)
101101
return new
@@ -184,8 +184,8 @@ def remove(self, exception):
184184
) from None
185185
new = type(self)(
186186
self.message,
187-
self.exceptions[:idx] + self.exceptions[idx + 1 :],
188-
self.sources[:idx] + self.sources[idx + 1 :],
187+
[*self.exceptions[:idx], *self.exceptions[idx + 1 :]],
188+
[*self.sources[:idx], *self.sources[idx + 1 :]],
189189
)
190190
self._copy_magic_attrs(new)
191191
return new

0 commit comments

Comments
 (0)