Merge branch 'python-3.0-to-3.2' into python-2.4

This commit is contained in:
rocky
2023-06-30 02:28:10 -04:00
14 changed files with 216 additions and 142 deletions

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2016-2018, 2020, 2022 Rocky Bernstein
# Copyright (c) 2016-2018, 2020, 2022-2023 Rocky Bernstein
"""
spark grammar differences over Python2.5 for Python 2.4.
"""
@@ -112,8 +112,8 @@ class Python24Parser(Python25Parser):
lhs = rule[0]
if lhs == "nop_stmt":
l = len(tokens)
if 0 <= l < len(tokens):
token_len = len(tokens)
if 0 <= token_len < len(tokens):
return not int(tokens[first].pattr) == tokens[last].offset
elif lhs == "try_except":
if last == len(tokens):