Nick Coghlan added the comment: I think the implementation I just checked in is close to being as simple as we can get:
Blocks ending in _exec_module and _recursive_import are trimmed unconditionally For SyntaxError, it also trims blocks ending in get_code For ImportError, it trims everything involving importlib Because the latter two are conditional on the kind of exception thrown, it's only the first two that could be unified and I think keeping the two distinct checks is actually clearer in that case. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15425> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com