mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-29762: More use "raise from None". (#569)
This hides unwanted implementation details from tracebacks.
This commit is contained in:
parent
43ba8861e0
commit
5affd23e6f
30 changed files with 50 additions and 48 deletions
|
|
@ -70,7 +70,7 @@ def _reduce_ex(self, proto):
|
|||
except AttributeError:
|
||||
if getattr(self, "__slots__", None):
|
||||
raise TypeError("a class that defines __slots__ without "
|
||||
"defining __getstate__ cannot be pickled")
|
||||
"defining __getstate__ cannot be pickled") from None
|
||||
try:
|
||||
dict = self.__dict__
|
||||
except AttributeError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue