From d2b28ddfc2a7350c2f63b75d06cc53d17b3a66ff Mon Sep 17 00:00:00 2001 From: Rob B Date: Fri, 5 Sep 2025 11:28:47 +0200 Subject: [PATCH] runtime(python): add syntax support inside f-strings fixes: #14033 closes: #17962 Signed-off-by: Rob B Signed-off-by: Christian Brabandt --- runtime/syntax/python.vim | 23 ++++++----- .../dumps/python_strings_bytes_01.dump | 2 +- .../dumps/python_strings_bytes_02.dump | 2 +- .../dumps/python_strings_bytes_03.dump | 2 +- .../dumps/python_strings_bytes_04.dump | 18 ++++----- .../dumps/python_strings_bytes_05.dump | 28 ++++++------- .../dumps/python_strings_bytes_06.dump | 18 ++++----- .../dumps/python_strings_bytes_07.dump | 40 +++++++++---------- .../dumps/python_strings_bytes_08.dump | 40 +++++++++---------- .../dumps/python_strings_bytes_09.dump | 40 +++++++++---------- .../dumps/python_strings_bytes_10.dump | 36 ++++++++--------- .../dumps/python_strings_bytes_11.dump | 32 +++++++-------- .../dumps/python_strings_bytes_12.dump | 32 +++++++-------- .../testdir/input/python_strings_bytes.py | 31 +++++++++----- 14 files changed, 180 insertions(+), 164 deletions(-) diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim index e963155d4a..ba3c6f3a1a 100644 --- a/runtime/syntax/python.vim +++ b/runtime/syntax/python.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Python " Maintainer: Zvezdan Petkovic -" Last Change: 2025 Aug 23 +" Last Change: 2025 Sep 05 " Credits: Neil Schemenauer " Dmitry Vasiliev " Rob B @@ -218,21 +218,24 @@ syn region pythonRawBytes " F-string replacement fields " -" - Matched parentheses, brackets and braces are ignored -" - A bare # is ignored to end of line -" - A bare = (surrounded by optional whitespace) enables debugging -" - A bare ! prefixes a conversion field +" - Matched parentheses, brackets and braces are skipped +" - A bare = (followed by optional whitespace) enables debugging +" - A bare ! prefixes a conversion field (followed by optional whitespace) " - A bare : begins a format specification -" - Matched braces inside a format specification are ignored +" - Matched braces inside a format specification are skipped " syn region pythonFStringField \ matchgroup=pythonFStringDelimiter \ start=/{/ - \ skip=/([^)]*)\|\[[^]]*]\|{[^}]*}\|#.*$/ - \ end=/\%(\s*=\s*\)\=\%(!\a\)\=\%(:\%({[^}]*}\|[^}]*\)\+\)\=}/ + \ end=/\%(=\s*\)\=\%(!\a\s*\)\=\%(:\%({\_[^}]*}\|[^{}]*\)\+\)\=}/ \ contained -" Doubled braces and Unicode escapes are not replacement fields -syn match pythonFStringSkip /{{\|\\N{/ transparent contained contains=NONE + \ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonDoctest,pythonDoctestValue,@Spell +syn match pythonFStringFieldSkip /(\_[^()]*)\|\[\_[^][]*]\|{\_[^{}]*}/ + \ contained + \ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonDoctest,pythonDoctestValue,@Spell + +" Doubled braces are not replacement fields +syn match pythonFStringSkip /{{/ transparent contained contains=NONE syn match pythonEscape +\\[abfnrtv'"\\]+ contained syn match pythonEscape "\\\o\{1,3}" contained diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_01.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_01.dump index f8ea6801ad..f9f1c74eb1 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_01.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_01.dump @@ -17,4 +17,4 @@ |a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42 |a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38 @75 -@57|1|7|,|1| @10|6|%| +@57|1|7|,|1| @10|5|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_02.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_02.dump index 704cbe3485..1683bdd8bb 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_02.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_02.dump @@ -17,4 +17,4 @@ |#+0#0000e05&| |R|a|w| |U|n|i|c|o|d|e| |l|i|t|e|r|a|l|s| |a|r|e| |n|o|t| |a|l@1|o|w|e|d| +0#0000000&@36 |t|e|s|t| |=| |u|r+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@27 |t|e|s|t| |=| |u|R+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@30 -@57|3@1|,|1| @9|1|5|%| +@57|3@1|,|1| @9|1|4|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_03.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_03.dump index 610311dac9..28ba342fe4 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_03.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_03.dump @@ -17,4 +17,4 @@ |a+0#e000002&|n|d| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@46 @75 |#+0#0000e05&| |F|o|r|m|a|t@1|e|d| |s|t|r|i|n|g| |l|i|t|e|r|a|l|s| |(|f|-|s|t|r|i|n|g|s|)| +0#0000000&@35 -@57|4|9|,|1| @9|2|4|%| +@57|4|9|,|1| @9|2|3|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_04.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_04.dump index ba0de991da..35085253c5 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_04.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_04.dump @@ -1,20 +1,20 @@ |#+0#0000e05#ffffff0| |F|o|r|m|a|t@1|e|d| |s|t|r|i|n|g| |l|i|t|e|r|a|l|s| |(|f|-|s|t|r|i|n|g|s|)| +0#0000000&@35 |#+0#0000e05&| |h|t@1|p|s|:|/@1|d|o|c|s|.|p|y|t|h|o|n|.|o|r|g|/|3|/|r|e|f|e|r|e|n|c|e|/|l|e|x|i|c|a|l|_|a|n|a|l|y|s|i|s|.|h|t|m|l|#|f|-|s|t|r|i|n|g|s| +0#0000000&@5 -|t|e|s|t| |=| |f+0#e000002&|'|F|-|s|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t| +0#e000002&|a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r|}+0#e000e06&|'+0#e000002& -|t+0#0000000&|e|s|t| |=| |F+0#e000002&|"|F|-|s|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#e000002&|a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r|}+0#e000e06&|"+0#e000002&| +0#0000000&@2 +|t|e|s|t| |=| |f+0#e000002&|'|F|-|s|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t| +0#e000002&|a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r|}+0#e000e06&|'+0#e000002& +|t+0#0000000&|e|s|t| |=| |F+0#e000002&|"|F|-|s|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#e000002&|a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r|}+0#e000e06&|"+0#e000002&| +0#0000000&@2 |t|e|s|t| |=| |f+0#e000002&|'|F|-|s|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M -|A|T|I|O|N| |M|A|R|K|}| +0#e000002&|a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@35 ->t|e|s|t| |=| |F+0#e000002&|"|F|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |{@1|f|i|e|l|d|}@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r|}+0#e000e06&|"+0#e000002&| +0#0000000&@6 +|A|T|I|O|N| |M|A|R|K|}| +0#e000002&|a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@35 +>t|e|s|t| |=| |F+0#e000002&|"|F|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |{@1|f|i|e|l|d|}@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r|}+0#e000e06&|"+0#e000002&| +0#0000000&@6 |t|e|s|t| |=| |f+0#e000002&|'@2|F|-|s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@35 |a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42 |a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#0000000&@41 -|a+0#e000002&|n|d| |f|i|e|l|d|s| |{+0#e000e06&|1+0#0000000&|}+0#e000e06&|,+0#e000002&| |{+0#e000e06&|2+0#0000000&|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|1+0#0000000&| @48 +|a+0#e000002&|n|d| |f|i|e|l|d|s| |{+0#e000e06&|1+0#e000002&|}+0#e000e06&|,+0#e000002&| |{+0#e000e06&|2+0#e000002&|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|1+0#e000002&| +0#0000000&@48 @4|+| @69 -@4|2|}+0#e000e06&|'+0#e000002&@2| +0#0000000&@65 +@4|2+0#e000002&|}+0#e000e06&|'+0#e000002&@2| +0#0000000&@65 |t|e|s|t| |=| |F+0#e000002&|"@2|F|-|s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@35 |a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42 |a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#0000000&@41 -|a+0#e000002&|n|d| |f|i|e|l|d|s| |{+0#e000e06&|1+0#0000000&|}+0#e000e06&|,+0#e000002&| |{+0#e000e06&|2+0#0000000&|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|1+0#0000000&| @48 +|a+0#e000002&|n|d| |f|i|e|l|d|s| |{+0#e000e06&|1+0#e000002&|}+0#e000e06&|,+0#e000002&| |{+0#e000e06&|2+0#e000002&|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|1+0#e000002&| +0#0000000&@48 @4|+| @69 -@4|2|}+0#e000e06&|"+0#e000002&@2| +0#0000000&@65 -@57|6@1|,|1| @9|3|4|%| +@4|2+0#e000002&|}+0#e000e06&|"+0#e000002&@2| +0#0000000&@65 +@57|6@1|,|1| @9|3|1|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_05.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_05.dump index 2c3f5c0372..0a321294a7 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_05.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_05.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@3|2|}+0#e000e06&|"+0#e000002&@2| +0#0000000&@65 +| +0&#ffffff0@3|2+0#e000002&|}+0#e000e06&|"+0#e000002&@2| +0#0000000&@65 @75 |#+0#0000e05&| |R|a|w| |f|o|r|m|a|t@1|e|d| |s|t|r|i|n|g| |l|i|t|e|r|a|l|s| +0#0000000&@43 -|t|e|s|t| |=| |f+0#e000002&|r|'|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06& -|b+0#0000000&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@69 ->t|e|s|t| |=| |f+0#e000002&|R|"|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r +|t|e|s|t| |=| |f+0#e000002&|r|'|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06& +|b+0#00e0003&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@69 +>t|e|s|t| |=| |f+0#e000002&|R|"|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r |}+0#e000e06&|"+0#e000002&| +0#0000000&@72 -|t|e|s|t| |=| |F+0#e000002&|r|'|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E -|X|C|L|A|M|A|T|I|O|N| |M|A|R|K|}| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@30 -|t|e|s|t| |=| |F+0#e000002&|R|"|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |{@1|f|i|e|l|d|}@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r|}+0#e000e06&|"+0#e000002&| +0#0000000&@1 -|t|e|s|t| |=| |r+0#e000002&|f|'|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06& -|b+0#0000000&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@69 -|t|e|s|t| |=| |r+0#e000002&|F|"|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r +|t|e|s|t| |=| |F+0#e000002&|r|'|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |f|i|e|l|d|s| |\|N|{+0#e000e06&|F+0#00e0003&|I|E +|L|D|,+0#0000000&| |N+0#00e0003&|O|T|,+0#0000000&| |E+0#00e0003&|S|C|A|P|E|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@37 +|t|e|s|t| |=| |F+0#e000002&|R|"|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |{@1|f|i|e|l|d|}@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r|}+0#e000e06&|"+0#e000002&| +0#0000000&@1 +|t|e|s|t| |=| |r+0#e000002&|f|'|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06& +|b+0#00e0003&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@69 +|t|e|s|t| |=| |r+0#e000002&|F|"|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r |}+0#e000e06&|"+0#e000002&| +0#0000000&@72 -|t|e|s|t| |=| |R+0#e000002&|f|'|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E -|X|C|L|A|M|A|T|I|O|N| |M|A|R|K|}| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@30 -|t|e|s|t| |=| |R+0#e000002&|F|"|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |{@1|f|i|e|l|d|}@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#0000000&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#0000000&|a|r|}+0#e000e06&|"+0#e000002&| +0#0000000&@1 +|t|e|s|t| |=| |R+0#e000002&|f|'|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |f|i|e|l|d|s| |\|N|{+0#e000e06&|F+0#00e0003&|I|E +|L|D|,+0#0000000&| |N+0#00e0003&|O|T|,+0#0000000&| |E+0#00e0003&|S|C|A|P|E|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r|}+0#e000e06&|'+0#e000002&| +0#0000000&@37 +|t|e|s|t| |=| |R+0#e000002&|F|"|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |{@1|f|i|e|l|d|}@1| |a|n|d| |f|i|e|l|d|s| |{+0#e000e06&|f+0#00e0003&|o@1|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|b+0#00e0003&|a|r|}+0#e000e06&|"+0#e000002&| +0#0000000&@1 |t|e|s|t| |=| |f+0#e000002&|r|'@2|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@30 |a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42 -@57|8|2|,|1| @9|4|2|%| +@57|8|2|,|1| @9|3|9|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_06.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_06.dump index a9ac329dfc..d8bb2d097f 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_06.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_06.dump @@ -1,20 +1,20 @@ |a+0#e000002#ffffff0|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42 |a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| +0#0000000&@41 -|a+0#e000002&|n|d| |f|i|e|l|d|s| |{+0#e000e06&|1+0#0000000&|}+0#e000e06&|,+0#e000002&| |{+0#e000e06&|2+0#0000000&|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|1+0#0000000&| @48 +|a+0#e000002&|n|d| |f|i|e|l|d|s| |{+0#e000e06&|1+0#e000002&|}+0#e000e06&|,+0#e000002&| |{+0#e000e06&|2+0#e000002&|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|1+0#e000002&| +0#0000000&@48 @4|+| @69 -@4|2|}+0#e000e06&|'+0#e000002&@2| +0#0000000&@65 +@4|2+0#e000002&|}+0#e000e06&|'+0#e000002&@2| +0#0000000&@65 >t|e|s|t| |=| |R+0#e000002&|F|"@2|R|a|w| |f|-|s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@30 |a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42 |a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| +0#0000000&@41 -|a+0#e000002&|n|d| |f|i|e|l|d|s| |{+0#e000e06&|1+0#0000000&|}+0#e000e06&|,+0#e000002&| |{+0#e000e06&|2+0#0000000&|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|1+0#0000000&| @48 +|a+0#e000002&|n|d| |f|i|e|l|d|s| |{+0#e000e06&|1+0#e000002&|}+0#e000e06&|,+0#e000002&| |{+0#e000e06&|2+0#e000002&|}+0#e000e06&| +0#e000002&|a|n|d| |{+0#e000e06&|1+0#e000002&| +0#0000000&@48 @4|+| @69 -@4|2|}+0#e000e06&|"+0#e000002&@2| +0#0000000&@65 +@4|2+0#e000002&|}+0#e000e06&|"+0#e000002&@2| +0#0000000&@65 @75 |#+0#0000e05&| |F|-|s|t|r|i|n|g| |r|e|p|l|a|c|e|m|e|n|t| |f|i|e|l|d|s| +0#0000000&@45 |t|e|s|t| |=| |f+0#e000002&|"|S|t|r|i|n|g| |i|s| |{+0#e000e06&| +0#0000000&@54 -@4|"|o|n|e| |p|l|u|s| |"| @59 -@4|"|t|w|o| |p|l|u|s| |"| @59 -@4|"|t|h|r|e@1|"|}+0#e000e06&|"+0#e000002&| +0#0000000&@61 +@4|"+0#e000002&|o|n|e| |p|l|u|s| |"| +0#0000000&@59 +@4|"+0#e000002&|t|w|o| |p|l|u|s| |"| +0#0000000&@59 +@4|"+0#e000002&|t|h|r|e@1|"|}+0#e000e06&|"+0#e000002&| +0#0000000&@61 |t|e|s|t| |=| |f+0#e000002&|"|N|u|m|b|e|r| |i|s| |{+0#e000e06&| +0#0000000&@54 -@4|1| |+| @67 -@57|9|5|,|1| @9|5|0|%| +@4|1+0#e000002&| +0#0000000&|+| @67 +@57|9|5|,|1| @9|4|7|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_07.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_07.dump index 7ada66081a..36a8ccf3a6 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_07.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_07.dump @@ -1,20 +1,20 @@ -| +0&#ffffff0@3|1| |+| @67 -@4|2| |+| @67 -@4|3|}+0#e000e06&|"+0#e000002&| +0#0000000&@67 -|t|e|s|t| |=| |f+0#e000002&|"|a|b|c|{+0#e000e06&|a+0#0000000&| |#| |T|h|i|s| |i|s| |a| |c|o|m@1|e|n|t| |}| @38 -@4|+| |1|}+0#e000e06&|"+0#e000002&| +0#0000000&@65 ->t|e|s|t| |=| |f+0#e000002&|"|d|e|f|{+0#e000e06&|a+0#0000000&| |#| |S|o| |i|s| |t|h|i|s| |:| @45 -@4|+| |2|}+0#e000e06&|"+0#e000002&| +0#0000000&@65 -|t|e|s|t| |=| |f+0#e000002&|"|g|h|i|{+0#e000e06&|a+0#0000000&| |#| |A|n|d| |t|h|i|s| |"| @47 -@4|+| |3|}+0#e000e06&|"+0#e000002&| +0#0000000&@65 -|t|e|s|t| |=| |f+0#e000002&|"|H|e| |s|a|i|d| |h|i|s| |n|a|m|e| |i|s| |{+0#e000e06&|n+0#0000000&|a|m|e|!+0#e000e06&|r|}|.+0#e000002&|"| +0#0000000&@35 -|t|e|s|t| |=| |f+0#e000002&|"|H|e| |s|a|i|d| |h|i|s| |n|a|m|e| |i|s| |{+0#e000e06&|r+0#0000000&|e|p|r|(|n|a|m|e|)|}+0#e000e06&|.+0#e000002&|"| +0#0000000&@31 -|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#0000000&|a|l|u|e|:+0#e000e06&|{|w|i|d|t|h|}@1|"+0#e000002&| +0#0000000&@41 -|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#0000000&|a|l|u|e|:+0#e000e06&|{|w|i|d|t|h|}|.|{|p|r|e|c|i|s|i|o|n|}|}+0#e000002&|"| +0#0000000&@29 -|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#0000000&|a|l|u|e|:+0#e000e06&|{|w|i|d|t|h|:|d|}|.|{|p|r|e|c|i|s|i|o|n|!|s|}|}+0#e000002&|"| +0#0000000&@25 -|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#0000000&|a|l|u|e|:+0#e000e06&|{|o|p|t|i|o|n|s|}|{|w|i|d|t|h|}|{|g|r|o|u|p|i|n|g|}|{|p|r|e|c|i|s|i|o|n|}|{|t|y|p|e|}@1|"+0#e000002&| +0#0000000&@5 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#0000000&|u|m|b|e|r|:+0#e000e06&|#|0|x|}|"+0#e000002&| +0#0000000&@52 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#0000000&|u|m|b|e|r|:+0#e000e06&|+|#|0|x|}|"+0#e000002&| +0#0000000&@51 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#0000000&|u|m|b|e|r|:+0#e000e06&|<|+|#|0|x|}|"+0#e000002&| +0#0000000&@50 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#0000000&|u|m|b|e|r|:+0#e000e06&| |<|+|#|0|x|}|"+0#e000002&| +0#0000000&@49 -@57|1@1|3|,|1| @8|6|1|%| +| +0&#ffffff0@3|1+0#e000002&| +0#0000000&|+| @67 +@4|2+0#e000002&| +0#0000000&|+| @67 +@4|3+0#e000002&|}+0#e000e06&|"+0#e000002&| +0#0000000&@67 +|t|e|s|t| |=| |f+0#e000002&|"|a|b|c|{+0#e000e06&|a+0#00e0003&| +0#0000000&|#+0#0000e05&| |T|h|i|s| |i|s| |a| |c|o|m@1|e|n|t| |}| +0#0000000&@38 +@4|+| |1+0#e000002&|}+0#e000e06&|"+0#e000002&| +0#0000000&@65 +>t|e|s|t| |=| |f+0#e000002&|"|d|e|f|{+0#e000e06&|a+0#00e0003&| +0#0000000&|#+0#0000e05&| |S|o| |i|s| |t|h|i|s| |:| +0#0000000&@45 +@4|+| |2+0#e000002&|}+0#e000e06&|"+0#e000002&| +0#0000000&@65 +|t|e|s|t| |=| |f+0#e000002&|"|g|h|i|{+0#e000e06&|a+0#00e0003&| +0#0000000&|#+0#0000e05&| |A|n|d| |t|h|i|s| |"| +0#0000000&@47 +@4|+| |3+0#e000002&|}+0#e000e06&|"+0#e000002&| +0#0000000&@65 +|t|e|s|t| |=| |f+0#e000002&|"|H|e| |s|a|i|d| |h|i|s| |n|a|m|e| |i|s| |{+0#e000e06&|n+0#00e0003&|a|m|e|!+0#e000e06&|r|}|.+0#e000002&|"| +0#0000000&@35 +|t|e|s|t| |=| |f+0#e000002&|"|H|e| |s|a|i|d| |h|i|s| |n|a|m|e| |i|s| |{+0#e000e06&|r+0#00e0e07&|e|p|r|(+0#0000000&|n+0#00e0003&|a|m|e|)+0#0000000&|}+0#e000e06&|.+0#e000002&|"| +0#0000000&@31 +|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#00e0003&|a|l|u|e|:+0#e000e06&|{|w|i|d|t|h|}@1|"+0#e000002&| +0#0000000&@41 +|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#00e0003&|a|l|u|e|:+0#e000e06&|{|w|i|d|t|h|}|.|{|p|r|e|c|i|s|i|o|n|}@1|"+0#e000002&| +0#0000000&@29 +|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#00e0003&|a|l|u|e|:+0#e000e06&|{| +0#0000000&@49 +| +0#e000e06&@7|w|i|d|t|h| +0#0000000&@61 +| +0#e000e06&@3|}|.|{| +0#0000000&@67 +| +0#e000e06&@7|p|r|e|c|i|s|i|o|n| +0#0000000&@57 +| +0#e000e06&@3|}@1|"+0#e000002&| +0#0000000&@67 +|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#00e0003&|a|l|u|e|:+0#e000e06&|{|w|i|d|t|h|:|d|}|.|{|p|r|e|c|i|s|i|o|n|!|s|}@1|"+0#e000002&| +0#0000000&@25 +@57|1@1|3|,|1| @8|5|6|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_08.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_08.dump index 40ef0ecdc2..7e1b41801d 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_08.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_08.dump @@ -1,20 +1,20 @@ -|t+0&#ffffff0|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#0000000&|u|m|b|e|r|:+0#e000e06&| |<|+|#|0|x|}|"+0#e000002&| +0#0000000&@49 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#0000000&|u|m|b|e|r|:+0#e000e06&|<|#|0|x|}|"+0#e000002&| +0#0000000&@51 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#0000000&|u|m|b|e|r|:+0#e000e06&| |<|#|0|x|}|"+0#e000002&| +0#0000000&@50 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#0000000&|t|r|i|n|g|=+0#e000e06&|}|"+0#e000002&| +0#0000000&@55 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#0000000&|t|r|i|n|g|=+0#e000e06&|!|r|}|"+0#e000002&| +0#0000000&@53 ->t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#0000000&|t|r|i|n|g|=+0#e000e06&|:|2|0|}|"+0#e000002&| +0#0000000&@52 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#0000000&|t|r|i|n|g|=+0#e000e06&|!|r|:|2|0|}|"+0#e000002&| +0#0000000&@50 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#0000000&|t|r|i|n|g| +0#e000e06&|=| |}|"+0#e000002&| +0#0000000&@53 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#0000000&|t|r|i|n|g| +0#e000e06&|=| |!|r|}|"+0#e000002&| +0#0000000&@51 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#0000000&|t|r|i|n|g| +0#e000e06&|=| |:|2|0|}|"+0#e000002&| +0#0000000&@50 -|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#0000000&|t|r|i|n|g| +0#e000e06&|=| |!|r|:|2|0|}|"+0#e000002&| +0#0000000&@48 -|t|e|s|t| |=| |f+0#e000002&|"|a|b|c| |{+0#e000e06&|a+0#0000000&|[|"|x|"|]|}+0#e000e06&| +0#e000002&|d|e|f|"| +0#0000000&@48 -|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |c|o|n|t|a|i|n|s|:|\+0#e000e06&|n|{|"+0#0000000&|\|n|"|.|j|o|i|n|(|a|)|}+0#e000e06&|"+0#e000002&| +0#0000000&@34 -|t|e|s|t| |=| |f+0#e000002&|"|T|o|d|a|y|'|s| |d|a|t|e| |i|s| |{+0#e000e06&|d+0#0000000&|a|t|e|t|i|m|e|.|n|o|w|(|)|}+0#e000e06&|"+0#e000002&| +0#0000000&@32 -|t|e|s|t| |=| |f+0#e000002&|"|T|o|d|a|y|'|s| |f|o|r|m|a|t@1|e|d| |d|a|t|e| |i|s| |{+0#e000e06&|d+0#0000000&|a|t|e|t|i|m|e|.|n|o|w|(|)|:+0#e000e06&|%|Y|-|%|m|-|%|d| |%|H|:|%|M|:|%|S|}|"+0#e000002&| +0#0000000&@4 -|t|e|s|t| |=| |f+0#e000002&|"|D|a|t|e| |i|s| |{+0#e000e06&|d+0#0000000&|a|t|e|t|i|m|e|.|d|a|t|e|t|i|m|e|(|2|0|1|0|,| |7|,| |4|,| |1|2|,| |1|5|,| |5|8|)|}+0#e000e06&|"+0#e000002&| +0#0000000&@13 -|t|e|s|t| |=| |f+0#e000002&|"|F|o|r|m|a|t@1|e|d| |d|a|t|e| |i|s| |{+0#e000e06&|d+0#0000000&|a|t|e|t|i|m|e|.|d|a|t|e|t|i|m|e|(|2|0|1|0|,| |7|,| |4|,| |1|2|,| |1|5|,| |5|8|)|:+0#e000e06&|%|Y|-|%|m -|-|%|d| |%|H|:|%|M|:|%|S|}|"+0#e000002&| +0#0000000&@60 -|t|e|s|t| |=| |f+0#e000002&|"|L|a|m|b|d|a| |r|e|t|u|r|n|s| |{+0#e000e06&|(+0#0000000&|l|a|m|b|d|a| |x|:| |x|*@1|2|)|}+0#e000e06&|"+0#e000002&| +0#0000000&@31 -@57|1|3|1|,|1| @8|7|1|%| +|t+0&#ffffff0|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#00e0003&|a|l|u|e|:+0#e000e06&|{|w|i|d|t|h|:|d|}|.|{|p|r|e|c|i|s|i|o|n|!|s|}@1|"+0#e000002&| +0#0000000&@25 +|t|e|s|t| |=| |f+0#e000002&|"|r|e|s|u|l|t|:| |{+0#e000e06&|v+0#00e0003&|a|l|u|e|:+0#e000e06&|{|o|p|t|i|o|n|s|}|{|w|i|d|t|h|}|{|g|r|o|u|p|i|n|g|}|{|p|r|e|c|i|s|i|o|n|}|{|t|y|p|e|}@1|"+0#e000002&| +0#0000000&@5 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#00e0003&|u|m|b|e|r|:+0#e000e06&|#|0|x|}|"+0#e000002&| +0#0000000&@52 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#00e0003&|u|m|b|e|r|:+0#e000e06&|+|#|0|x|}|"+0#e000002&| +0#0000000&@51 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#00e0003&|u|m|b|e|r|:+0#e000e06&|<|+|#|0|x|}|"+0#e000002&| +0#0000000&@50 +>t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#00e0003&|u|m|b|e|r|:+0#e000e06&| |<|+|#|0|x|}|"+0#e000002&| +0#0000000&@49 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#00e0003&|u|m|b|e|r|:+0#e000e06&|<|#|0|x|}|"+0#e000002&| +0#0000000&@51 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|n+0#00e0003&|u|m|b|e|r|:+0#e000e06&| |<|#|0|x|}|"+0#e000002&| +0#0000000&@50 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#00e0003&|t|r|i|n|g|=+0#e000e06&|}|"+0#e000002&| +0#0000000&@55 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#00e0003&|t|r|i|n|g|=+0#e000e06&|!|r|}|"+0#e000002&| +0#0000000&@53 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#00e0003&|t|r|i|n|g|=+0#e000e06&|:|2|0|}|"+0#e000002&| +0#0000000&@52 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&|s+0#00e0003&|t|r|i|n|g|=+0#e000e06&|!|r|:|2|0|}|"+0#e000002&| +0#0000000&@50 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&| +0#0000000&|s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#e000e06&| |}|"+0#e000002&| +0#0000000&@52 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&| +0#0000000&|s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#e000e06&| |!|r|}|"+0#e000002&| +0#0000000&@50 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&| +0#0000000&|s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#e000e06&| |!|r| |}|"+0#e000002&| +0#0000000&@49 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&| +0#0000000&|s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#e000e06&| |:|2|0|}|"+0#e000002&| +0#0000000&@49 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&| +0#0000000&|s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#e000e06&| |!|r|:|2|0|}|"+0#e000002&| +0#0000000&@47 +|t|e|s|t| |=| |f+0#e000002&|"|{+0#e000e06&| +0#0000000&|s+0#00e0003&|t|r|i|n|g| +0#0000000&|=+0#e000e06&| |!|r| |:|2|0|}|"+0#e000002&| +0#0000000&@46 +|t|e|s|t| |=| |f+0#e000002&|"|a|b|c| |{+0#e000e06&|a+0#00e0003&|[+0#0000000&|"+0#e000002&|x|"|]+0#0000000&|}+0#e000e06&| +0#e000002&|d|e|f|"| +0#0000000&@48 +@57|1|3|1|,|1| @8|6@1|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_09.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_09.dump index 9c9847d5c3..b7c0b3a3d5 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_09.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_09.dump @@ -1,20 +1,20 @@ -|t+0&#ffffff0|e|s|t| |=| |f+0#e000002&|"|L|a|m|b|d|a| |r|e|t|u|r|n|s| |{+0#e000e06&|(+0#0000000&|l|a|m|b|d|a| |x|:| |x|*@1|2|)|}+0#e000e06&|"+0#e000002&| +0#0000000&@31 -|t|e|s|t| |=| |f+0#e000002&|"|Z|e|r|o| |p|a|d@1|e|d| |l|a|m|b|d|a| |r|e|t|u|r|n|s| |{+0#e000e06&|(+0#0000000&|l|a|m|b|d|a| |x|:| |x|*@1|2|)|:+0#e000e06&|0|9|}|"+0#e000002&| +0#0000000&@16 -|t|e|s|t| |=| |f+0#e000002&|"|S|p|a|c|e| |p|a|d@1|e|d| |l|a|m|b|d|a| |r|e|t|u|r|n|s| |{+0#e000e06&|(+0#0000000&|l|a|m|b|d|a| |x|:| |x|*@1|2|)|:+0#e000e06&|{|w|i|d|t|h|}@1|"+0#e000002&| +0#0000000&@10 -|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |c|o|p|y| |i|s| |{+0#e000e06&|i+0#0000000&|t|e|m|s|[|:|]|}+0#e000e06&|"+0#e000002&| +0#0000000&@41 -|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |s|l|i|c|e| |i|s| |{+0#e000e06&|i+0#0000000&|t|e|m|s|[|1|:|]|}+0#e000e06&|"+0#e000002&| +0#0000000&@39 ->t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |s|l|i|c|e| |i|s| |{+0#e000e06&|i+0#0000000&|t|e|m|s|[|:|9|]|}+0#e000e06&|"+0#e000002&| +0#0000000&@39 -|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |e|l|e|m|e|n|t|s| |a|r|e| |{+0#e000e06&|i+0#0000000&|t|e|m|s|[|:|2|:|]|}+0#e000e06&|"+0#e000002&| +0#0000000&@34 -|t|e|s|t| |=| |f+0#e000002&|"|P|a|d@1|e|d| |l|i|s|t| |c|o|p|y| |i|s| |{+0#e000e06&|i+0#0000000&|t|e|m|s|[|:|]|:+0#e000e06&|9@1|}|"+0#e000002&| +0#0000000&@31 -|t|e|s|t| |=| |f+0#e000002&|"|L|e|f|t|-|a|l|i|g|n|e|d| |l|i|s|t| |s|l|i|c|e| |i|s| |{+0#e000e06&|i+0#0000000&|t|e|m|s|[|1|:|]|:+0#e000e06&|<|9@1|}|"+0#e000002&| +0#0000000&@22 -|t|e|s|t| |=| |f+0#e000002&|"|R|i|g|h|t| |a|l|i|g|n|e|d| |l|i|s|t| |s|l|i|c|e| |i|s| |{+0#e000e06&|i+0#0000000&|t|e|m|s|[|:|9|]|:+0#e000e06&|>|9@1|}|"+0#e000002&| +0#0000000&@21 -|t|e|s|t| |=| |f+0#e000002&|"|C|e|n|t|e|r|-|a|l|i|g|n|e|d| |l|i|s|t| |e|l|e|m|e|n|t|s| |a|r|e| |{+0#e000e06&|i+0#0000000&|t|e|m|s|[|:|2|:|]|:+0#e000e06&|^|9@1|}|"+0#e000002&| +0#0000000&@15 -|t|e|s|t| |=| |f+0#e000002&|"|E|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#0000000&| |=@1| |1|}+0#e000e06&|"+0#e000002&| +0#0000000&@42 -|t|e|s|t| |=| |f+0#e000002&|"|E|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#0000000&| |!|=| |1|}+0#e000e06&|"+0#e000002&| +0#0000000&@42 -|t|e|s|t| |=| |f+0#e000002&|"|E|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|(+0#0000000&|x| |:|=| |1|)|}+0#e000e06&|"+0#e000002&| +0#0000000&@40 -|t|e|s|t| |=| |f+0#e000002&|"|D|e|b|u|g| |e|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#0000000&| |=@1| |1|=+0#e000e06&|}|"+0#e000002&| +0#0000000&@35 -|t|e|s|t| |=| |f+0#e000002&|"|D|e|b|u|g| |e|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#0000000&| |!|=| |1|=+0#e000e06&|}|"+0#e000002&| +0#0000000&@35 -|t|e|s|t| |=| |f+0#e000002&|"|D|e|b|u|g| |e|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|(+0#0000000&|x| |:|=| |1|)|=+0#e000e06&|}|"+0#e000002&| +0#0000000&@33 -|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|[|x|*@1|2| |f|o|r| |x| |i|n| |r|a|n|g|e|(|1|0|)|]| |}+0#e000e06&|"+0#e000002&| +0#0000000&@8 -|t|e|s|t| |=| |f+0#e000002&|"|P|a|d@1|e|d| |l|i|s|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|[|x|*@1|2| |f|o|r| |x| |i|n| |r|a|n|g|e|(|1|0|)|]| |:+0#e000e06&|@+0#4040ff13&@2 -| +0#0000000&@56|1|4|8|,|1| @8|8|0|%| +|t+0&#ffffff0|e|s|t| |=| |f+0#e000002&|"|a|b|c| |{+0#e000e06&|a+0#00e0003&|[+0#0000000&|"+0#e000002&|x|"|]+0#0000000&|}+0#e000e06&| +0#e000002&|d|e|f|"| +0#0000000&@48 +|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |c|o|n|t|a|i|n|s|:|\+0#e000e06&|n|{|"+0#e000002&|\+0#e000e06&|n|"+0#e000002&|.+0#0000000&|j|o|i|n|(|a+0#00e0003&|)+0#0000000&|}+0#e000e06&|"+0#e000002&| +0#0000000&@34 +|t|e|s|t| |=| |f+0#e000002&|"|T|o|d|a|y|'|s| |d|a|t|e| |i|s| |{+0#e000e06&|d+0#00e0003&|a|t|e|t|i|m|e|.+0#0000000&|n|o|w|(|)|}+0#e000e06&|"+0#e000002&| +0#0000000&@32 +|t|e|s|t| |=| |f+0#e000002&|"|T|o|d|a|y|'|s| |f|o|r|m|a|t@1|e|d| |d|a|t|e| |i|s| |{+0#e000e06&|d+0#00e0003&|a|t|e|t|i|m|e|.+0#0000000&|n|o|w|(|)|:+0#e000e06&|%|Y|-|%|m|-|%|d| |%|H|:|%|M|:|%|S|}|"+0#e000002&| +0#0000000&@4 +|t|e|s|t| |=| |f+0#e000002&|"|D|a|t|e| |i|s| |{+0#e000e06&|d+0#00e0003&|a|t|e|t|i|m|e|.+0#0000000&|d|a|t|e|t|i|m|e|(|2+0#e000002&|0|1|0|,+0#0000000&| |7+0#e000002&|,+0#0000000&| |4+0#e000002&|,+0#0000000&| |1+0#e000002&|2|,+0#0000000&| |1+0#e000002&|5|,+0#0000000&| |5+0#e000002&|8|)+0#0000000&|}+0#e000e06&|"+0#e000002&| +0#0000000&@13 +>t|e|s|t| |=| |f+0#e000002&|"|F|o|r|m|a|t@1|e|d| |d|a|t|e| |i|s| |{+0#e000e06&|d+0#00e0003&|a|t|e|t|i|m|e|.+0#0000000&|d|a|t|e|t|i|m|e|(|2+0#e000002&|0|1|0|,+0#0000000&| |7+0#e000002&|,+0#0000000&| |4+0#e000002&|,+0#0000000&| |1+0#e000002&|2|,+0#0000000&| |1+0#e000002&|5|,+0#0000000&| |5+0#e000002&|8|)+0#0000000&|:+0#e000e06&|%|Y|-|%|m +|-|%|d| |%|H|:|%|M|:|%|S|}|"+0#e000002&| +0#0000000&@60 +|t|e|s|t| |=| |f+0#e000002&|"|L|a|m|b|d|a| |r|e|t|u|r|n|s| |{+0#e000e06&|(+0#0000000&|l+0#af5f00255&|a|m|b|d|a| +0#0000000&|x+0#00e0003&|:+0#0000000&| |x+0#00e0003&|*+0#0000000&@1|2+0#e000002&|)+0#0000000&|}+0#e000e06&|"+0#e000002&| +0#0000000&@31 +|t|e|s|t| |=| |f+0#e000002&|"|Z|e|r|o| |p|a|d@1|e|d| |l|a|m|b|d|a| |r|e|t|u|r|n|s| |{+0#e000e06&|(+0#0000000&|l+0#af5f00255&|a|m|b|d|a| +0#0000000&|x+0#00e0003&|:+0#0000000&| |x+0#00e0003&|*+0#0000000&@1|2+0#e000002&|)+0#0000000&|:+0#e000e06&|0|9|}|"+0#e000002&| +0#0000000&@16 +|t|e|s|t| |=| |f+0#e000002&|"|S|p|a|c|e| |p|a|d@1|e|d| |l|a|m|b|d|a| |r|e|t|u|r|n|s| |{+0#e000e06&|(+0#0000000&|l+0#af5f00255&|a|m|b|d|a| +0#0000000&|x+0#00e0003&|:+0#0000000&| |x+0#00e0003&|*+0#0000000&@1|2+0#e000002&|)+0#0000000&|:+0#e000e06&|{|w|i|d|t|h|}@1|"+0#e000002&| +0#0000000&@10 +|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |c|o|p|y| |i|s| |{+0#e000e06&|i+0#00e0003&|t|e|m|s|[+0#0000000&|:|]|}+0#e000e06&|"+0#e000002&| +0#0000000&@41 +|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |s|l|i|c|e| |i|s| |{+0#e000e06&|i+0#00e0003&|t|e|m|s|[+0#0000000&|1+0#e000002&|:+0#0000000&|]|}+0#e000e06&|"+0#e000002&| +0#0000000&@39 +|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |s|l|i|c|e| |i|s| |{+0#e000e06&|i+0#00e0003&|t|e|m|s|[+0#0000000&|:|9+0#e000002&|]+0#0000000&|}+0#e000e06&|"+0#e000002&| +0#0000000&@39 +|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |e|l|e|m|e|n|t|s| |a|r|e| |{+0#e000e06&|i+0#00e0003&|t|e|m|s|[+0#0000000&|:|2+0#e000002&|:+0#0000000&|]|}+0#e000e06&|"+0#e000002&| +0#0000000&@34 +|t|e|s|t| |=| |f+0#e000002&|"|P|a|d@1|e|d| |l|i|s|t| |c|o|p|y| |i|s| |{+0#e000e06&|i+0#00e0003&|t|e|m|s|[+0#0000000&|:|]|:+0#e000e06&|9@1|}|"+0#e000002&| +0#0000000&@31 +|t|e|s|t| |=| |f+0#e000002&|"|L|e|f|t|-|a|l|i|g|n|e|d| |l|i|s|t| |s|l|i|c|e| |i|s| |{+0#e000e06&|i+0#00e0003&|t|e|m|s|[+0#0000000&|1+0#e000002&|:+0#0000000&|]|:+0#e000e06&|<|9@1|}|"+0#e000002&| +0#0000000&@22 +|t|e|s|t| |=| |f+0#e000002&|"|R|i|g|h|t| |a|l|i|g|n|e|d| |l|i|s|t| |s|l|i|c|e| |i|s| |{+0#e000e06&|i+0#00e0003&|t|e|m|s|[+0#0000000&|:|9+0#e000002&|]+0#0000000&|:+0#e000e06&|>|9@1|}|"+0#e000002&| +0#0000000&@21 +|t|e|s|t| |=| |f+0#e000002&|"|C|e|n|t|e|r|-|a|l|i|g|n|e|d| |l|i|s|t| |e|l|e|m|e|n|t|s| |a|r|e| |{+0#e000e06&|i+0#00e0003&|t|e|m|s|[+0#0000000&|:|2+0#e000002&|:+0#0000000&|]|:+0#e000e06&|^|9@1|}|"+0#e000002&| +0#0000000&@15 +|t|e|s|t| |=| |f+0#e000002&|"|E|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#00e0003&| +0#0000000&|=@1| |1+0#e000002&|}+0#e000e06&|"+0#e000002&| +0#0000000&@42 +@57|1|4|9|,|1| @8|7|5|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_10.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_10.dump index 15781d7f67..0d210e7506 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_10.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_10.dump @@ -1,20 +1,20 @@ -|t+0&#ffffff0|e|s|t| |=| |f+0#e000002&|"|P|a|d@1|e|d| |l|i|s|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|[|x|*@1|2| |f|o|r| |x| |i|n| |r|a|n|g|e|(|1|0|)|]| |:+0#e000e06&|9@1|} +|t+0&#ffffff0|e|s|t| |=| |f+0#e000002&|"|E|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#00e0003&| +0#0000000&|=@1| |1+0#e000002&|}+0#e000e06&|"+0#e000002&| +0#0000000&@42 +|t|e|s|t| |=| |f+0#e000002&|"|E|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#00e0003&| +0#0000000&|!|=| |1+0#e000002&|}+0#e000e06&|"+0#e000002&| +0#0000000&@42 +|t|e|s|t| |=| |f+0#e000002&|"|E|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|(+0#0000000&|x+0#00e0003&| +0#0000000&|:|=| |1+0#e000002&|)+0#0000000&|}+0#e000e06&|"+0#e000002&| +0#0000000&@40 +|t|e|s|t| |=| |f+0#e000002&|"|D|e|b|u|g| |e|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#00e0003&| +0#0000000&|=@1| |1+0#e000002&|=+0#e000e06&|}|"+0#e000002&| +0#0000000&@35 +|t|e|s|t| |=| |f+0#e000002&|"|D|e|b|u|g| |e|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|x+0#00e0003&| +0#0000000&|!|=| |1+0#e000002&|=+0#e000e06&|}|"+0#e000002&| +0#0000000&@35 +>t|e|s|t| |=| |f+0#e000002&|"|D|e|b|u|g| |e|x|p|r|e|s@1|i|o|n| |i|s| |{+0#e000e06&|(+0#0000000&|x+0#00e0003&| +0#0000000&|:|=| |1+0#e000002&|)+0#0000000&|=+0#e000e06&|}|"+0#e000002&| +0#0000000&@33 +|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|[|x+0#00e0003&|*+0#0000000&@1|2+0#e000002&| +0#0000000&|f+0#af5f00255&|o|r| +0#0000000&|x+0#00e0003&| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|r+0#00e0e07&|a|n|g|e|(+0#0000000&|1+0#e000002&|0|)+0#0000000&|]| |}+0#e000e06&|"+0#e000002&| +0#0000000&@8 +|t|e|s|t| |=| |f+0#e000002&|"|L|i|s|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|[| @35 +@8|x+0#00e0003&|*+0#0000000&@1|2+0#e000002&| +0#0000000&|f+0#af5f00255&|o|r| +0#0000000&|x+0#00e0003&| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|r+0#00e0e07&|a|n|g|e|(+0#0000000&|1+0#e000002&|0|)+0#0000000&| @43 +@4|]| |}+0#e000e06&|"+0#e000002&| +0#0000000&@66 +|t|e|s|t| |=| |f+0#e000002&|"|P|a|d@1|e|d| |l|i|s|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|[|x+0#00e0003&|*+0#0000000&@1|2+0#e000002&| +0#0000000&|f+0#af5f00255&|o|r| +0#0000000&|x+0#00e0003&| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|r+0#00e0e07&|a|n|g|e|(+0#0000000&|1+0#e000002&|0|)+0#0000000&|]| |:+0#e000e06&|9@1|} |"+0#e000002&| +0#0000000&@73 -|t|e|s|t| |=| |f+0#e000002&|"|D|i|c|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|{|x|:| |x|*@1|2| |f|o|r| |x| |i|n| |r|a|n|g|e|(|1|0|)|}| |}+0#e000e06&|"+0#e000002&| +0#0000000&@5 -|t|e|s|t| |=| |f+0#e000002&|"|P|a|d@1|e|d| |d|i|c|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|{|x|:| |x|*@1|2| |f|o|r| |x| |i|n| |r|a|n|g|e|(|1|0|)|}| |:+0#e000e06& +|t|e|s|t| |=| |f+0#e000002&|"|D|i|c|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|{|x+0#00e0003&|:+0#0000000&| |x+0#00e0003&|*+0#0000000&@1|2+0#e000002&| +0#0000000&|f+0#af5f00255&|o|r| +0#0000000&|x+0#00e0003&| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|r+0#00e0e07&|a|n|g|e|(+0#0000000&|1+0#e000002&|0|)+0#0000000&|}| |}+0#e000e06&|"+0#e000002&| +0#0000000&@5 +|t|e|s|t| |=| |f+0#e000002&|"|D|i|c|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|{| @35 +@8|x+0#00e0003&|:+0#0000000&| |x+0#00e0003&|*+0#0000000&@1|2+0#e000002&| +0#0000000&|f+0#af5f00255&|o|r| +0#0000000&|x+0#00e0003&| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|r+0#00e0e07&|a|n|g|e|(+0#0000000&|1+0#e000002&|0|)+0#0000000&| @40 +@4|}| |}+0#e000e06&|"+0#e000002&| +0#0000000&@66 +|t|e|s|t| |=| |f+0#e000002&|"|P|a|d@1|e|d| |d|i|c|t| |c|o|m|p|r|e|h|e|n|s|i|o|n| |r|e|t|u|r|n|s| |{+0#e000e06&| +0#0000000&|{|x+0#00e0003&|:+0#0000000&| |x+0#00e0003&|*+0#0000000&@1|2+0#e000002&| +0#0000000&|f+0#af5f00255&|o|r| +0#0000000&|x+0#00e0003&| +0#0000000&|i+0#af5f00255&|n| +0#0000000&|r+0#00e0e07&|a|n|g|e|(+0#0000000&|1+0#e000002&|0|)+0#0000000&|}| |:+0#e000e06& |9@1|}|"+0#e000002&| +0#0000000&@70 -> @74 -|#+0#0000e05&| |B|y|t|e|s| +0#0000000&@67 -|t|e|s|t| |=| |b+0#e000002&|'|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@29 -|t|e|s|t| |=| |B+0#e000002&|"|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@32 -|t|e|s|t| |=| |b+0#e000002&|'|B|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T|I -|O|N| |M|A|R|K|}|'| +0#0000000&@65 -|t|e|s|t| |=| |B+0#e000002&|"|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@20 -|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66 -|t|e|s|t| |=| |b+0#e000002&|'@2|B|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38 -|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42 -|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38 -|t|e|s|t| |=| |B+0#e000002&|"@2|B|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38 -|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42 -|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38 -@57|1|6|4|,|0|-|1| @6|8|9|%| +@75 +@57|1|6@1|,|1| @8|8|4|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_11.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_11.dump index 297f46cf49..d3cc144d83 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_11.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_11.dump @@ -1,20 +1,20 @@ -|a+0#e000002#ffffff0|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38 +| +0&#ffffff0@74 +|#+0#0000e05&| |B|y|t|e|s| +0#0000000&@67 +|t|e|s|t| |=| |b+0#e000002&|'|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@29 +|t|e|s|t| |=| |B+0#e000002&|"|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@32 +|t|e|s|t| |=| |b+0#e000002&|'|B|y|t|e|s| |w|i|t|h| |S|y|n|t|a|x|W|a|r|n|i|n|g| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C +|L|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@59 +>t|e|s|t| |=| |B+0#e000002&|"|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@20 +|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66 +|t|e|s|t| |=| |b+0#e000002&|'@2|B|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38 +|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42 +|a+0#e000002&|n|d| |S|y|n|t|a|x|W|a|r|n|i|n|g| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@32 +|t|e|s|t| |=| |B+0#e000002&|"@2|B|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38 +|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42 +|a+0#e000002&|n|d| |S|y|n|t|a|x|W|a|r|n|i|n|g| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@32 @75 |#+0#0000e05&| |R|a|w| |b|y|t|e|s| +0#0000000&@63 |t|e|s|t| |=| |b+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24 |t|e|s|t| |=| |b+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27 ->t|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L -|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60 -|t|e|s|t| |=| |B+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13 -|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66 -|t|e|s|t| |=| |r+0#e000002&|b|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24 -|t|e|s|t| |=| |r+0#e000002&|B|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27 -|t|e|s|t| |=| |R+0#e000002&|b|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L -|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60 -|t|e|s|t| |=| |R+0#e000002&|B|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13 -|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66 -|t|e|s|t| |=| |b+0#e000002&|r|'@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33 -|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42 -|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38 -|t|e|s|t| |=| |R+0#e000002&|B|"@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33 -@57|1|8|1|,|1| @8|9|8|%| +|t|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|@+0#4040ff13&@2 +| +0#0000000&@56|1|8|2|,|1| @8|9|2|%| diff --git a/runtime/syntax/testdir/dumps/python_strings_bytes_12.dump b/runtime/syntax/testdir/dumps/python_strings_bytes_12.dump index d2cf6bad0a..9ae3142a8e 100644 --- a/runtime/syntax/testdir/dumps/python_strings_bytes_12.dump +++ b/runtime/syntax/testdir/dumps/python_strings_bytes_12.dump @@ -1,20 +1,20 @@ -|t+0&#ffffff0|e|s|t| |=| |R+0#e000002&|B|"@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33 +|t+0&#ffffff0|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L +|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60 +|t|e|s|t| |=| |B+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13 +|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66 +|t|e|s|t| |=| |r+0#e000002&|b|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24 +>t|e|s|t| |=| |r+0#e000002&|B|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27 +|t|e|s|t| |=| |R+0#e000002&|b|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L +|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60 +|t|e|s|t| |=| |R+0#e000002&|B|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13 +|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66 +|t|e|s|t| |=| |b+0#e000002&|r|'@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33 |a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42 ->a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38 +|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38 +|t|e|s|t| |=| |R+0#e000002&|B|"@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33 +|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42 +|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38 |~+0#4040ff13&| @73 |~| @73 |~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -|~| @73 -| +0#0000000&@56|1|9|4|,|1| @8|B|o|t| +| +0#0000000&@56|1|9|8|,|1| @8|B|o|t| diff --git a/runtime/syntax/testdir/input/python_strings_bytes.py b/runtime/syntax/testdir/input/python_strings_bytes.py index 1b87fd4ac7..fc405ed7e1 100644 --- a/runtime/syntax/testdir/input/python_strings_bytes.py +++ b/runtime/syntax/testdir/input/python_strings_bytes.py @@ -80,11 +80,11 @@ and fields {1}, {2} and {1 # Raw formatted string literals test = fr'Raw f-string with literal \' and \" and \t and fields {foo} and {bar}' test = fR"Raw f-string with literal \040 and \xFF and fields {foo} and {bar}" -test = Fr'Raw f-string with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK} and fields {foo} and {bar}' +test = Fr'Raw f-string with literal \u00A1 and \U00010605 and fields \N{FIELD, NOT, ESCAPE} and {foo} and {bar}' test = FR"Raw f-string with literal {{field}} and fields {foo} and {bar}" test = rf'Raw f-string with literal \' and \" and \t and fields {foo} and {bar}' test = rF"Raw f-string with literal \040 and \xFF and fields {foo} and {bar}" -test = Rf'Raw f-string with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK} and fields {foo} and {bar}' +test = Rf'Raw f-string with literal \u00A1 and \U00010605 and fields \N{FIELD, NOT, ESCAPE} and {foo} and {bar}' test = RF"Raw f-string with literal {{field}} and fields {foo} and {bar}" test = fr'''Raw f-string with quotes ' and " and literal \t and \040 and \xFF @@ -118,6 +118,11 @@ test = f"He said his name is {name!r}." test = f"He said his name is {repr(name)}." test = f"result: {value:{width}}" test = f"result: {value:{width}.{precision}}" +test = f"result: {value:{ + width + }.{ + precision + }}" test = f"result: {value:{width:d}.{precision!s}}" test = f"result: {value:{options}{width}{grouping}{precision}{type}}" test = f"{number:#0x}" @@ -130,10 +135,12 @@ test = f"{string=}" test = f"{string=!r}" test = f"{string=:20}" test = f"{string=!r:20}" -test = f"{string = }" -test = f"{string = !r}" -test = f"{string = :20}" -test = f"{string = !r:20}" +test = f"{ string = }" +test = f"{ string = !r}" +test = f"{ string = !r }" +test = f"{ string = :20}" +test = f"{ string = !r:20}" +test = f"{ string = !r :20}" test = f"abc {a["x"]} def" test = f"List contains:\n{"\n".join(a)}" test = f"Today's date is {datetime.now()}" @@ -158,22 +165,28 @@ test = f"Debug expression is {x == 1=}" test = f"Debug expression is {x != 1=}" test = f"Debug expression is {(x := 1)=}" test = f"List comprehension returns { [x**2 for x in range(10)] }" +test = f"List comprehension returns { [ + x**2 for x in range(10) + ] }" test = f"Padded list comprehension returns { [x**2 for x in range(10)] :99}" test = f"Dict comprehension returns { {x: x**2 for x in range(10)} }" +test = f"Dict comprehension returns { { + x: x**2 for x in range(10) + } }" test = f"Padded dict comprehension returns { {x: x**2 for x in range(10)} :99}" # Bytes test = b'Bytes with escapes \' and \" and \t' test = B"Bytes with escapes \040 and \xFF" -test = b'Bytes with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}' +test = b'Bytes with SyntaxWarning \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}' test = B"Bytes with escaped \\ backslash and ignored \ newline" test = b'''Bytes with quotes ' and " and escapes \t and \040 and \xFF -and literal \u00A1 and \U00010605''' +and SyntaxWarning \u00A1 and \U00010605''' test = B"""Bytes with quotes ' and " and escapes \t and \040 and \xFF -and literal \u00A1 and \U00010605""" +and SyntaxWarning \u00A1 and \U00010605""" # Raw bytes test = br'Raw bytes with literal \' and \" and \t'