]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove dead code in codeop.py (#105263)
authorTian Gao <gaogaotiantian@hotmail.com>
Mon, 5 Jun 2023 16:14:10 +0000 (09:14 -0700)
committerGitHub <noreply@github.com>
Mon, 5 Jun 2023 16:14:10 +0000 (18:14 +0200)
Lib/codeop.py

index 2213b69f231f92fb9ddc68a822ed06212370ef7b..a574aa4b70f1a8a517523cca27597e5b5fffe60e 100644 (file)
@@ -72,16 +72,6 @@ def _maybe_compile(compiler, source, filename, symbol):
 
     return compiler(source, filename, symbol)
 
-
-def _is_syntax_error(err1, err2):
-    rep1 = repr(err1)
-    rep2 = repr(err2)
-    if "was never closed" in rep1 and "was never closed" in rep2:
-        return False
-    if rep1 == rep2:
-        return True
-    return False
-
 def _compile(source, filename, symbol):
     return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT | PyCF_ALLOW_INCOMPLETE_INPUT)