[Python-checkins] Remove dead code in codeop.py (#105263)
ambv
webhook-mailer at python.org
Mon Jun 5 12:14:18 EDT 2023
https://github.com/python/cpython/commit/677cf3974190f1f627ff63cc6c8777d7f390e47b
commit: 677cf3974190f1f627ff63cc6c8777d7f390e47b
branch: main
author: Tian Gao <gaogaotiantian at hotmail.com>
committer: ambv <lukasz at langa.pl>
date: 2023-06-05T18:14:10+02:00
summary:
Remove dead code in codeop.py (#105263)
files:
M Lib/codeop.py
diff --git a/Lib/codeop.py b/Lib/codeop.py
index 2213b69f231f..a574aa4b70f1 100644
--- a/Lib/codeop.py
+++ b/Lib/codeop.py
@@ -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)
More information about the Python-checkins
mailing list