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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/EJG2LDJTTZVHTN5CHN23PE33RZD35UAI/
Code of Conduct: http://python.org/psf/codeofconduct/