Serhiy Storchaka added the comment: > What to do when you try to chain "C -> C"?
Nothing. Or may be raise an exception (because C.__context__ can't be set to what you try). > you expected one type of exception, then you used some external library, and > after that you have a completely different exception. I don't understand what new can add the reordering. It doesn't change original exception, it only changes __context__, but you change it in any case. If silently ignore the loop, you would get __context__ different from what you expected. If raise TypeError, you would get TypeError instead of expected exception. And if the decision will be to raise TypeError, may be RuntimeError is more appropriate? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25782> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com