Serhiy Storchaka added the comment:

Updated patch uses C API added in issue28410. It preserves the traceback of 
original exception:

Traceback (most recent call last):
  File "issue28214.py", line 3, in __set_name__
    1/0
ZeroDivisionError: division by zero

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "issue28214.py", line 5, in <module>
    class TheoreticallyCouldWork:
RuntimeError: Error calling __set_name__ on 'FaultyImplementation' instance 
'attr' in 'TheoreticallyCouldWork'

----------
Added file: http://bugs.python.org/file45129/set_name_chain_error_cause_2.patch

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

Reply via email to