commit | 5affd23e6f42125998724787025080a24839266e | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Wed Apr 05 09:37:24 2017 +0300 |
committer | GitHub <noreply@github.com> | Wed Apr 05 09:37:24 2017 +0300 |
tree | 8b7ca82362e78a32805b117d574082d512251d3c | |
parent | 43ba8861e0ad044efafa46a7cc04e12ac5df640e [diff] [blame] |
bpo-29762: More use "raise from None". (#569) This hides unwanted implementation details from tracebacks.
diff --git a/Lib/difflib.py b/Lib/difflib.py index 2095a5e..8296471 100644 --- a/Lib/difflib.py +++ b/Lib/difflib.py
@@ -2079,7 +2079,7 @@ tag = {1: "- ", 2: "+ "}[int(which)] except KeyError: raise ValueError('unknown delta choice (must be 1 or 2): %r' - % which) + % which) from None prefixes = (" ", tag) for line in delta: if line[:2] in prefixes: