Message287304
True. Attributes __context__, __cause__ and __traceback__ are not pickled. The traceback objects are even not pickleable.
What is worse, some other non-special attributes are lost during pickling. For example name and path attributes of ImportError.
>>> try: import foo
... except Exception as ex: exc = ex
...
>>> exc.name
'foo'
>>> exc.__reduce__()
(<class 'ModuleNotFoundError'>, ("No module named 'foo'",), {})
Or the value attribute of StopIteration if it was not passed to the constructor.
>>> exc = StopIteration()
>>> exc.value = 42
>>> exc.__reduce__()
(<class 'StopIteration'>, (), {}) |
|
Date |
User |
Action |
Args |
2017-02-08 11:55:09 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, ncoghlan, diekhans, alexandre.vassalotti, eric.snow |
2017-02-08 11:55:09 | serhiy.storchaka | set | messageid: <1486554909.42.0.680609972535.issue29466@psf.upfronthosting.co.za> |
2017-02-08 11:55:09 | serhiy.storchaka | link | issue29466 messages |
2017-02-08 11:55:09 | serhiy.storchaka | create | |
|