Yury Selivanov added the comment:
Here's a minimal test to reproduce:
import reprlib
def main():
if 0:
yield
raise RuntimeError
m = main()
try:
m.send(None)
except RuntimeError as ex:
ex.__context__ = ex
reprlib.repr(ex)
Looks like it's a bug in reprlib. It's not related to PEP 492/479.
It's also reproducible in Python 3.4 and 3.3.
Nick, ExitStack does this (indirectly) 'ex.__context__ = ex' thing -- I think
that's a bug of contextlib.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25779>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com