Message401135
The default __reduce__ method of Exception returns the arg you pass to the Exception constructor:
>>> a = ExcA("a banana")
>>> a.__reduce__()
(<class '__main__.ExcA'>, ('missing a banana',))
>>>
This is then pickled, and when unpickled the arg is passed to the ExcA constructor.
If you want to change this, you can implement __reduce__ on ExcA o return just the part you want it to return. |
|
Date |
User |
Action |
Args |
2021-09-06 13:08:03 | iritkatriel | set | recipients:
+ iritkatriel, yonghengzero |
2021-09-06 13:08:03 | iritkatriel | set | messageid: <1630933683.82.0.057014853624.issue45112@roundup.psfhosted.org> |
2021-09-06 13:08:03 | iritkatriel | link | issue45112 messages |
2021-09-06 13:08:03 | iritkatriel | create | |
|