Note that CALL_METHOD is used in 3.7+

and not just Pypy anymore
This commit is contained in:
rocky
2019-07-18 05:26:33 -04:00
parent 3f9a862277
commit 71735ca7ef
2 changed files with 2 additions and 2 deletions

View File

@@ -825,7 +825,7 @@ class Python3Parser(PythonParser):
# Note: don't add to custom_ops_processed.
elif opname_base == "CALL_METHOD":
# PyPy only - DRY with parse2
# PyPy and Python 3.7+ only - DRY with parse2
args_pos, args_kw = self.get_pos_kw(token)

View File

@@ -2123,7 +2123,7 @@ class SourceWalker(GenericASTTraversal, object):
op = k[: k.rfind("_")]
if k.startswith("CALL_METHOD"):
# This happens in PyPy only
# This happens in PyPy and Python 3.7+
TABLE_R[k] = ("%c(%P)", 0, (1, -1, ", ", 100))
elif self.version >= 3.6 and k.startswith("CALL_FUNCTION_KW"):
TABLE_R[k] = ("%c(%P)", 0, (1, -1, ", ", 100))