diff options
author | da-woods <dw-git@d-woods.co.uk> | 2022-07-31 20:54:19 +0100 |
---|---|---|
committer | da-woods <dw-git@d-woods.co.uk> | 2022-07-31 20:54:19 +0100 |
commit | 1bb1210126ed17638e7a73b570bde927a45d2a27 (patch) | |
tree | c22da1554000db347655fc5c757be516df57984a | |
parent | 23972a4aeaab166a173797c08f371ada8231614d (diff) | |
download | cython-1bb1210126ed17638e7a73b570bde927a45d2a27.tar.gz |
Rename variable in parser
-rw-r--r-- | Cython/Compiler/Parsing.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index bb89875c4..8999a8e4d 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -4313,10 +4313,10 @@ def p_mapping_pattern(s): double_star_capture_target = None items_patterns = [] - double_star_is_not_final = None + star_star_arg_pos = None while True: - if double_star_capture_target and not double_star_is_not_final: - double_star_is_not_final = s.position() + if double_star_capture_target and not star_star_arg_pos: + star_star_arg_pos = s.position() if s.sy == '**': s.next() double_star_capture_target = p_pattern_capture_target(s) @@ -4339,9 +4339,9 @@ def p_mapping_pattern(s): break s.expect('}') - if double_star_is_not_final is not None: + if star_star_arg_pos is not None: return Nodes.ErrorNode( - double_star_is_not_final, + star_star_arg_pos, what = "** pattern must be the final part of a mapping pattern." ) return MatchCaseNodes.MatchMappingPatternNode( |