summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorda-woods <dw-git@d-woods.co.uk>2022-07-31 20:54:19 +0100
committerda-woods <dw-git@d-woods.co.uk>2022-07-31 20:54:19 +0100
commit1bb1210126ed17638e7a73b570bde927a45d2a27 (patch)
treec22da1554000db347655fc5c757be516df57984a
parent23972a4aeaab166a173797c08f371ada8231614d (diff)
downloadcython-1bb1210126ed17638e7a73b570bde927a45d2a27.tar.gz
Rename variable in parser
-rw-r--r--Cython/Compiler/Parsing.py10
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(