Irit Katriel <iritkatr...@gmail.com> added the comment:

I get different output for Serhiy's first example now, but the same for the 
second:

>>> try: import foo
... except Exception as ex: exc = ex
... 
>>> exc.name
'foo'
>>> exc.__reduce__()
(<class 'ModuleNotFoundError'>, ("No module named 'foo'",), {'name': 'foo'})
>>> exc = StopIteration()
>>> exc.value = 42
>>> exc.__reduce__()
(<class 'StopIteration'>, ())
>>>

----------
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue29466>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to