
On 2022-01-16 16:11, Steven D'Aprano wrote:
Do they? How are they different? You have a start delimiter and an end delimiter.
The only difference I see is that with strings the delimiter is the same, instead of a distinct open and close delimiter. But that difference is surely not a reason to reject the use of a prefix.
Well, there is a big difference, which is that the stuff between other delimiters (parentheses, brackets, etc.) is wholly constrained by Python syntax, whereas the stuff between string delimiters is free-form text, with only a few restrictions (like not being able to use the delimiter itself, or to include newlines in single-quoted strings). Whether that difference is important for your proposal I won't address right now. But it is a big difference. It also greatly affects how people view the code, since syntax highlighters will often color an entire string literal with the same color, whereas they don't typically do that for other kinds of delimited chunks, instead highlighting only the delimiters themselves. -- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown