Feature
Core template strings work, but several PEP 750 diagnostics still differ from CPython 3.14.
Minimal reproduction:
cases = [
("add", lambda: t"a" + "b"),
("bytes-mix", lambda: compile('t"x" b"y"', "<test>", "eval")),
]
for name, func in cases:
try:
func()
except Exception as exc:
print(name, type(exc).__name__, str(exc))
CPython 3.14.6:
add TypeError can only concatenate string.templatelib.Template (not "str") to string.templatelib.Template
bytes-mix SyntaxError cannot mix t-string literals with string or bytes literals (<test>, line 1)
RustPython:
add TypeError can only concatenate Template (not 'str') to Template
bytes-mix SyntaxError cannot mix bytes and nonbytes literals (<test>, line 1)
Related CPython-compatible t-string diagnostics are currently covered by expectedFailure markers in Lib/test/test_tstring.py, including test_template_concatenation, test_syntax_errors, and test_literal_concatenation.
Python Documentation or reference to CPython source code
Feature
Core template strings work, but several PEP 750 diagnostics still differ from CPython 3.14.
Minimal reproduction:
CPython 3.14.6:
RustPython:
Related CPython-compatible t-string diagnostics are currently covered by
expectedFailuremarkers inLib/test/test_tstring.py, includingtest_template_concatenation,test_syntax_errors, andtest_literal_concatenation.Python Documentation or reference to CPython source code